@NotThreadSafe public class NulTerminatedCharsetDecoder extends Object
CharsetDecoder
to provide decoding of NUL-terminated bytestrings to Unicode
Strings.
Instances of this object are not thread-safe. If you want to re-use this object, make sure to
synchronize access and invoke reset()
between uses.
Modifier and Type | Class and Description |
---|---|
static class |
NulTerminatedCharsetDecoder.Result |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INITIAL_CHAR_BUFFER_CAPACITY |
Constructor and Description |
---|
NulTerminatedCharsetDecoder(CharsetDecoder decoder) |
NulTerminatedCharsetDecoder(CharsetDecoder decoder,
int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
NulTerminatedCharsetDecoder.Result |
decode(ByteBuffer in,
CharBuffer out,
boolean endOfInput) |
String |
decodeString(ByteBuffer in) |
static String |
decodeUTF8String(ByteBuffer in) |
void |
reset() |
public static final int DEFAULT_INITIAL_CHAR_BUFFER_CAPACITY
public NulTerminatedCharsetDecoder(CharsetDecoder decoder)
public NulTerminatedCharsetDecoder(CharsetDecoder decoder, int initialCapacity)
public static String decodeUTF8String(ByteBuffer in) throws CharacterCodingException
CharacterCodingException
public String decodeString(ByteBuffer in) throws CharacterCodingException
CharacterCodingException
public NulTerminatedCharsetDecoder.Result decode(ByteBuffer in, CharBuffer out, boolean endOfInput)
public void reset()