public abstract class InputDecorator
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
InputDecorator() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.io.InputStream |
decorate(IOContext ctxt,
byte[] src,
int offset,
int length)
Method called by
JsonFactory instance when
creating parser on given "raw" byte source. |
java.io.DataInput |
decorate(IOContext ctxt,
java.io.DataInput input)
Method called by
JsonFactory instance when
creating parser given an DataInput, when this decorator
has been registered. |
abstract java.io.InputStream |
decorate(IOContext ctxt,
java.io.InputStream in)
Method called by
JsonFactory instance when
creating parser given an InputStream, when this decorator
has been registered. |
abstract java.io.Reader |
decorate(IOContext ctxt,
java.io.Reader r)
Method called by
JsonFactory instance when
creating parser given an Reader, when this decorator
has been registered. |
public abstract java.io.InputStream decorate(IOContext ctxt, java.io.InputStream in) throws java.io.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 sourcejava.io.IOException - if construction of InputStream failspublic abstract java.io.InputStream decorate(IOContext ctxt, byte[] src, int offset, int length) throws java.io.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 bufferInputStream to use as input source; or null to indicate
that contents are to be processed as-is by callerjava.io.IOException - if construction of InputStream failspublic java.io.DataInput decorate(IOContext ctxt, java.io.DataInput input) throws java.io.IOException
JsonFactory instance when
creating parser given an DataInput, when this decorator
has been registered.
Default implementation simply throws UnsupportedOperationException
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.input - Original input sourcejava.io.IOException - if construction of DataInput failspublic abstract java.io.Reader decorate(IOContext ctxt, java.io.Reader r) throws java.io.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.r - Original readerFilterReader)java.io.IOException - if construction of Reader failsCopyright © 2010 - 2023 Adobe. All Rights Reserved