@NotThreadSafe public final class StringDecoder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_BUFFER_SIZE |
| Constructor and Description |
|---|
StringDecoder(Charset aCharset) |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] aBuf) |
void |
decode(byte[] aBuffer,
int nOfs,
int nLen) |
void |
decode(ByteBuffer aByteBuffer) |
String |
finish(byte[] aBuf,
int nOfs,
int nLen) |
String |
finish(ByteBuffer aByteBuffer) |
void |
reserve(int nExpectedLength)
Reserve space for the next string that will be <= expectedLength characters
long.
|
public static final int INITIAL_BUFFER_SIZE
public void reserve(@Nonnegative int nExpectedLength)
nExpectedLength - The number of chars to reserve. Must be ≥ 0.public void decode(@Nonnull byte[] aBuf)
public void decode(@Nonnull byte[] aBuffer, @Nonnegative int nOfs, @Nonnegative int nLen)
public void decode(@Nonnull ByteBuffer aByteBuffer)
@Nonnull public String finish(@Nonnull byte[] aBuf, @Nonnegative int nOfs, @Nonnegative int nLen)
@Nonnull public String finish(@Nonnull ByteBuffer aByteBuffer)
Copyright © 2006–2014 phloc systems. All rights reserved.