Note
non-final since 2.4, to allow sub-classing.
| Modifier and Type | Field and Description |
|---|---|
| protected byte[] | _base64Buffer
Reference to the buffer allocated for temporary use with base64 encoding or decoding. |
| protected final BufferRecycler | _bufferRecycler
Recycler used for actual allocation/deallocation/reuse |
| private boolean | |
| protected char[] | _concatCBuffer
Reference to the buffer allocated for buffering it for output, before being encoded: generally this means concatenating output, then encoding when buffer fills up. |
| protected final ContentReference | _contentReference
Reference to the source object, which can be used for displaying location information |
| protected JsonEncoding | _encoding
Encoding used by the underlying stream, if known. |
| protected final ErrorReportConfiguration | |
| protected final boolean | _managedResource
Flag that indicates whether underlying input/output source/target object is fully managed by the owner of this context (parser or generator). |
| protected char[] | _nameCopyBuffer
Reference temporary buffer Parser instances need if calling app decides it wants to access name via 'getTextCharacters' method. |
| protected byte[] | _readIOBuffer
Reference to the allocated I/O buffer for low-level input reading, if any allocated. |
| protected final Object | _sourceRef
Old, deprecated "raw" reference to input source. |
| protected final StreamReadConstraints | |
| protected final StreamWriteConstraints | |
| protected char[] | _tokenCBuffer
Reference to the buffer allocated for tokenization purposes, in which character input is read, and from which it can be further returned. |
| protected byte[] | _writeEncodingBuffer
Reference to the allocated I/O buffer used for low-level encoding-related buffering. |
| Access | Constructor and Description |
|---|---|
| public | IOContext(StreamReadConstraints
constraints for streaming reads src, StreamWriteConstraints constraints for streaming writes swc, ErrorReportConfiguration Error report configuration to use erc, BufferRecycler BufferRecycler to use, if any ( br, ContentReference null if none)Input source reference for location reporting contentRef, boolean Whether input source is managed (owned) by Jackson library managedResource)Main constructor to use. |
| public | IOContext(StreamReadConstraints
constraints for streaming reads src, BufferRecycler BufferRecycler to use, if any ( br, ContentReference null if none)Input source reference for location reporting contentRef, boolean Whether input source is managed (owned) by Jackson library managedResource)
Deprecated
Since 2.16.
Deprecated legacy constructor.
|
| public | IOContext(BufferRecycler
BufferRecycler to use, if any ( br, ContentReference null if none)Input source reference for location reporting contentRef, boolean Whether input source is managed (owned) by Jackson library managedResource)
Deprecated
Since 2.15.
Deprecated legacy constructor.
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | |
| protected final void | |
| protected final void | |
| public byte[] | Returns: Allocated or recycled byte bufferMethod for recycling or allocation byte buffer of "base 64 encode/decode" type. |
| public byte[] | Returns: Allocated or recycled byte bufferMinimum size of the buffer to recycle or allocate minSize)Variant of |
| public char[] | |
| public char[] | |
| public byte[] | Returns: Allocated or recycled byte bufferMethod for recycling or allocation byte buffer of "read I/O" type. |
| public byte[] | Returns: Allocated or recycled byte bufferMinimum size of the buffer to recycle or allocate minSize)Variant of |
| public char[] | |
| public char[] | |
| public byte[] | Returns: Allocated or recycled byte bufferMethod for recycling or allocation byte buffer of "write encoding" type. |
| public byte[] | Returns: Allocated or recycled byte bufferMinimum size of the buffer to recycle or allocate minSize)Variant of |
| public void | close()
Implements java. |
| public TextBuffer | |
| public TextBuffer | |
| public ContentReference | Returns: Reference to input sourceAccessor for getting (some) information about input source, mostly usable for error reporting purposes. |
| public ErrorReportConfiguration | Returns: ConfiguredErrorReportConfiguration, containing configured values for
handling error reporting.
|
| public JsonEncoding | |
| public Object | Returns: "Raw" source reference
Deprecated
Since 2.13, use
contentReference() instead
|
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | releaseReadIOBuffer(byte[]
Buffer instance to release (return for recycling) buf)Method to call when all the processing buffers can be safely recycled. |
| public void | |
| public void | |
| public void | |
| public StreamReadConstraints | |
| public StreamWriteConstraints | |
| public IOContext | |
| private IllegalArgumentException |
| _base64Buffer | back to summary |
|---|---|
| protected byte[] _base64Buffer Reference to the buffer allocated for temporary use with base64 encoding or decoding. | |
| _bufferRecycler | back to summary |
|---|---|
| protected final BufferRecycler _bufferRecycler Recycler used for actual allocation/deallocation/reuse | |
| _closed | back to summary |
|---|---|
| private boolean _closed | |
| _concatCBuffer | back to summary |
|---|---|
| protected char[] _concatCBuffer Reference to the buffer allocated for buffering it for output, before being encoded: generally this means concatenating output, then encoding when buffer fills up. | |
| _contentReference | back to summary |
|---|---|
| protected final ContentReference _contentReference Reference to the source object, which can be used for displaying location information | |
| _encoding | back to summary |
|---|---|
| protected JsonEncoding _encoding Encoding used by the underlying stream, if known. | |
| _errorReportConfiguration | back to summary |
|---|---|
protected final ErrorReportConfiguration _errorReportConfiguration
| |
| _managedResource | back to summary |
|---|---|
| protected final boolean _managedResource Flag that indicates whether underlying input/output source/target object is fully managed by the owner of this context (parser or generator). If true, it is, and is to be closed by parser/generator; if false, calling application has to do closing (unless auto-closing feature is enabled for the parser/generator in question; in which case it acts like the owner). | |
| _nameCopyBuffer | back to summary |
|---|---|
| protected char[] _nameCopyBuffer Reference temporary buffer Parser instances need if calling app decides it wants to access name via 'getTextCharacters' method. Regular text buffer can not be used as it may contain textual representation of the value token. | |
| _readIOBuffer | back to summary |
|---|---|
| protected byte[] _readIOBuffer Reference to the allocated I/O buffer for low-level input reading, if any allocated. | |
| _sourceRef | back to summary |
|---|---|
| protected final Object _sourceRef
Deprecated Since 2.13, use Old, deprecated "raw" reference to input source. | |
| _streamReadConstraints | back to summary |
|---|---|
protected final StreamReadConstraints _streamReadConstraints
| |
| _streamWriteConstraints | back to summary |
|---|---|
protected final StreamWriteConstraints _streamWriteConstraints
| |
| _tokenCBuffer | back to summary |
|---|---|
| protected char[] _tokenCBuffer Reference to the buffer allocated for tokenization purposes, in which character input is read, and from which it can be further returned. | |
| _writeEncodingBuffer | back to summary |
|---|---|
| protected byte[] _writeEncodingBuffer Reference to the allocated I/O buffer used for low-level encoding-related buffering. | |
| IOContext | back to summary |
|---|---|
| public IOContext(StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, BufferRecycler br, ContentReference contentRef, boolean managedResource) Main constructor to use.
| |
| IOContext | back to summary |
|---|---|
| public IOContext(StreamReadConstraints src, BufferRecycler br, ContentReference contentRef, boolean managedResource)
Deprecated Since 2.16. Use Deprecated legacy constructor.
| |
| IOContext | back to summary |
|---|---|
| public IOContext(BufferRecycler br, ContentReference contentRef, boolean managedResource)
Deprecated Since 2.15. Use Deprecated legacy constructor.
| |
| IOContext | back to summary |
|---|---|
| public IOContext(BufferRecycler br, Object rawContent, boolean managedResource)
Deprecated
| |
| _verifyAlloc | back to summary |
|---|---|
| protected final void _verifyAlloc(Object buffer) | |
| _verifyRelease | back to summary |
|---|---|
| protected final void _verifyRelease(byte[] toRelease, byte[] src) | |
| _verifyRelease | back to summary |
|---|---|
| protected final void _verifyRelease(char[] toRelease, char[] src) | |
| allocBase64Buffer | back to summary |
|---|---|
| public byte[] allocBase64Buffer() Method for recycling or allocation byte buffer of "base 64 encode/decode" type. Note the method can only be called once during its life cycle. This is to protect against accidental sharing.
| |
| allocBase64Buffer | back to summary |
|---|---|
| public byte[] allocBase64Buffer(int minSize) Variant of
| |
| allocConcatBuffer | back to summary |
|---|---|
| public char[] allocConcatBuffer() | |
| allocNameCopyBuffer | back to summary |
|---|---|
| public char[] allocNameCopyBuffer(int minSize) | |
| allocReadIOBuffer | back to summary |
|---|---|
| public byte[] allocReadIOBuffer() Method for recycling or allocation byte buffer of "read I/O" type. Note the method can only be called once during its life cycle. This is to protect against accidental sharing.
| |
| allocReadIOBuffer | back to summary |
|---|---|
| public byte[] allocReadIOBuffer(int minSize) Variant of
| |
| allocTokenBuffer | back to summary |
|---|---|
| public char[] allocTokenBuffer() | |
| allocTokenBuffer | back to summary |
|---|---|
| public char[] allocTokenBuffer(int minSize) | |
| allocWriteEncodingBuffer | back to summary |
|---|---|
| public byte[] allocWriteEncodingBuffer() Method for recycling or allocation byte buffer of "write encoding" type. Note the method can only be called once during its life cycle. This is to protect against accidental sharing.
| |
| allocWriteEncodingBuffer | back to summary |
|---|---|
| public byte[] allocWriteEncodingBuffer(int minSize) Variant of
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| constructReadConstrainedTextBuffer | back to summary |
|---|---|
| public TextBuffer constructReadConstrainedTextBuffer() | |
| constructTextBuffer | back to summary |
|---|---|
| public TextBuffer constructTextBuffer() | |
| contentReference | back to summary |
|---|---|
| public ContentReference contentReference() Accessor for getting (some) information about input source, mostly usable for error reporting purposes.
| |
| errorReportConfiguration | back to summary |
|---|---|
public ErrorReportConfiguration errorReportConfiguration()
| |
| getEncoding | back to summary |
|---|---|
| public JsonEncoding getEncoding() | |
| getSourceReference | back to summary |
|---|---|
| public Object getSourceReference()
Deprecated Since 2.13, use
| |
| isResourceManaged | back to summary |
|---|---|
| public boolean isResourceManaged() | |
| releaseBase64Buffer | back to summary |
|---|---|
| public void releaseBase64Buffer(byte[] buf) | |
| releaseConcatBuffer | back to summary |
|---|---|
| public void releaseConcatBuffer(char[] buf) | |
| releaseNameCopyBuffer | back to summary |
|---|---|
| public void releaseNameCopyBuffer(char[] buf) | |
| releaseReadIOBuffer | back to summary |
|---|---|
| public void releaseReadIOBuffer(byte[] buf) Method to call when all the processing buffers can be safely recycled.
| |
| releaseTokenBuffer | back to summary |
|---|---|
| public void releaseTokenBuffer(char[] buf) | |
| releaseWriteEncodingBuffer | back to summary |
|---|---|
| public void releaseWriteEncodingBuffer(byte[] buf) | |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(JsonEncoding enc) | |
| streamReadConstraints | back to summary |
|---|---|
public StreamReadConstraints streamReadConstraints()
| |
| streamWriteConstraints | back to summary |
|---|---|
public StreamWriteConstraints streamWriteConstraints()
| |
| withEncoding | back to summary |
|---|---|
| public IOContext withEncoding(JsonEncoding enc) | |
| wrongBuf | back to summary |
|---|---|
| private IllegalArgumentException wrongBuf() | |