|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.core.io.InputDecorator
public abstract class InputDecorator
Handler class that can be used to decorate input sources. Typical use is to use a filter abstraction (filtered stream, reader) around original input source, and apply additional processing during read operations.
| Constructor Summary | |
|---|---|
InputDecorator()
|
|
| Method Summary | |
|---|---|
abstract InputStream |
decorate(IOContext ctxt,
byte[] src,
int offset,
int length)
Method called by JsonFactory instance when
creating parser on given "raw" byte source. |
abstract InputStream |
decorate(IOContext ctxt,
InputStream in)
Method called by JsonFactory instance when
creating parser given an InputStream, when this decorator
has been registered. |
abstract Reader |
decorate(IOContext ctxt,
Reader src)
Method called by JsonFactory instance when
creating parser given an Reader, when this decorator
has been registered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputDecorator()
| Method Detail |
|---|
public abstract InputStream decorate(IOContext ctxt,
InputStream in)
throws IOException
JsonFactory instance when
creating parser given an InputStream, when this decorator
has been registered.
ctxt - IO context in use (provides access to declared encoding).
NOTE: at this point context may not have all information initialized;
specifically auto-detected encoding is only available once parsing starts,
which may occur only after this method is called.in - Original input source
IOException
public abstract InputStream decorate(IOContext ctxt,
byte[] src,
int offset,
int length)
throws IOException
JsonFactory instance when
creating parser on given "raw" byte source.
Method can either construct a InputStream for reading; or return
null to indicate that no wrapping should occur.
ctxt - IO context in use (provides access to declared encoding)
NOTE: at this point context may not have all information initialized;
specifically auto-detected encoding is only available once parsing starts,
which may occur only after this method is called.src - Input buffer that contains contents to parseoffset - Offset of the first available byte in the input bufferlength - Number of bytes available in the input buffer
InputStream to use as input source; or null to indicate
that contents are to be processed as-is by caller
IOException
public abstract Reader decorate(IOContext ctxt,
Reader src)
throws IOException
JsonFactory instance when
creating parser given an Reader, when this decorator
has been registered.
ctxt - IO context in use (provides access to declared encoding)
NOTE: at this point context may not have all information initialized;
specifically auto-detected encoding is only available once parsing starts,
which may occur only after this method is called.src - Original input source
FilterReader)
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||