public class IOContext
extends java.lang.Object
NOTE: non-final since 2.4, to allow sub-classing.
Constructor and Description |
---|
IOContext(BufferRecycler br,
java.lang.Object sourceRef,
boolean managedResource) |
Modifier and Type | Method and Description |
---|---|
byte[] |
allocBase64Buffer() |
byte[] |
allocBase64Buffer(int minSize) |
char[] |
allocConcatBuffer() |
char[] |
allocNameCopyBuffer(int minSize) |
byte[] |
allocReadIOBuffer()
Note: the method can only be called once during its life cycle.
|
byte[] |
allocReadIOBuffer(int minSize) |
char[] |
allocTokenBuffer() |
char[] |
allocTokenBuffer(int minSize) |
byte[] |
allocWriteEncodingBuffer() |
byte[] |
allocWriteEncodingBuffer(int minSize) |
TextBuffer |
constructTextBuffer() |
JsonEncoding |
getEncoding() |
java.lang.Object |
getSourceReference() |
boolean |
isResourceManaged() |
void |
releaseBase64Buffer(byte[] buf) |
void |
releaseConcatBuffer(char[] buf) |
void |
releaseNameCopyBuffer(char[] buf) |
void |
releaseReadIOBuffer(byte[] buf)
Method to call when all the processing buffers can be safely
recycled.
|
void |
releaseTokenBuffer(char[] buf) |
void |
releaseWriteEncodingBuffer(byte[] buf) |
void |
setEncoding(JsonEncoding enc) |
IOContext |
withEncoding(JsonEncoding enc) |
public IOContext(BufferRecycler br, java.lang.Object sourceRef, boolean managedResource)
public void setEncoding(JsonEncoding enc)
public IOContext withEncoding(JsonEncoding enc)
public java.lang.Object getSourceReference()
public JsonEncoding getEncoding()
public boolean isResourceManaged()
public TextBuffer constructTextBuffer()
public byte[] allocReadIOBuffer()
Note: the method can only be called once during its life cycle. This is to protect against accidental sharing.
public byte[] allocReadIOBuffer(int minSize)
public byte[] allocWriteEncodingBuffer()
public byte[] allocWriteEncodingBuffer(int minSize)
public byte[] allocBase64Buffer()
public byte[] allocBase64Buffer(int minSize)
public char[] allocTokenBuffer()
public char[] allocTokenBuffer(int minSize)
public char[] allocConcatBuffer()
public char[] allocNameCopyBuffer(int minSize)
public void releaseReadIOBuffer(byte[] buf)
public void releaseWriteEncodingBuffer(byte[] buf)
public void releaseBase64Buffer(byte[] buf)
public void releaseTokenBuffer(char[] buf)
public void releaseConcatBuffer(char[] buf)
public void releaseNameCopyBuffer(char[] buf)
Copyright © 2010 - 2020 Adobe. All Rights Reserved