static final class ValueEncoderFactory.StringEncoder extends ValueEncoderFactory.ScalarEncoder
In addition, instances of this class are not recycled, as it seems less beneficial (less likely to need to be reused, or offer performance improvements if they would be)
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
_offset |
(package private) java.lang.String |
_value |
MIN_CHARS_WITHOUT_FLUSH| Modifier | Constructor and Description |
|---|---|
protected |
StringEncoder(java.lang.String value) |
| Modifier and Type | Method and Description |
|---|---|
int |
encodeMore(byte[] buffer,
int ptr,
int end) |
int |
encodeMore(char[] buffer,
int ptr,
int end) |
boolean |
isCompleted()
Method that can alternatively be called to determine whether encoder
has encoded all data it has.
|
bufferNeedsFlushpublic boolean isCompleted()
AsciiValueEncoderAsciiValueEncoder.encodeMore(char[], int, int), to figure out whether buffer flush
is needed (there is more data), or encoding is complete.isCompleted in class AsciiValueEncoderpublic int encodeMore(char[] buffer,
int ptr,
int end)
encodeMore in class AsciiValueEncoderAsciiValueEncoder.bufferNeedsFlush(int)
is appropriately called once before calling this
method)public int encodeMore(byte[] buffer,
int ptr,
int end)
encodeMore in class AsciiValueEncoderAsciiValueEncoder.bufferNeedsFlush(int)
is appropriately called once before calling this
method)