public class C2BConverter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected ByteChunk |
bb |
protected java.lang.String |
enc |
protected java.nio.charset.CharsetEncoder |
encoder |
| Constructor and Description |
|---|
C2BConverter(ByteChunk output,
java.lang.String encoding)
Create a converter, with bytes going to a byte buffer
|
C2BConverter(java.lang.String encoding)
Create a converter
|
| Modifier and Type | Method and Description |
|---|---|
void |
convert(char c)
Generate the bytes using the specified encoding
|
void |
convert(char[] c,
int off,
int len)
Generate the bytes using the specified encoding
|
void |
convert(MessageBytes mb)
Convert a message bytes chars to bytes
|
void |
convert(java.lang.String s)
Generate the bytes using the specified encoding
|
void |
convert(java.lang.String s,
int off,
int len)
Generate the bytes using the specified encoding
|
void |
flushBuffer()
Flush any internal buffers into the ByteOutput or the internal
byte[]
|
ByteChunk |
getByteChunk() |
java.lang.String |
getEncoding() |
static C2BConverter |
getInstance(ByteChunk output,
java.lang.String encoding) |
void |
recycle()
Reset the internal state, empty the buffers.
|
void |
setByteChunk(ByteChunk bb) |
protected ByteChunk bb
protected final java.lang.String enc
protected final java.nio.charset.CharsetEncoder encoder
public C2BConverter(ByteChunk output, java.lang.String encoding) throws java.io.IOException
java.io.IOExceptionpublic C2BConverter(java.lang.String encoding)
throws java.io.IOException
java.io.IOExceptionpublic static C2BConverter getInstance(ByteChunk output, java.lang.String encoding) throws java.io.IOException
java.io.IOExceptionpublic ByteChunk getByteChunk()
public java.lang.String getEncoding()
public void setByteChunk(ByteChunk bb)
public void recycle()
public void convert(char[] c,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void convert(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic void convert(java.lang.String s,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void convert(char c)
throws java.io.IOException
java.io.IOExceptionpublic void convert(MessageBytes mb) throws java.io.IOException
java.io.IOExceptionpublic void flushBuffer()
throws java.io.IOException
java.io.IOExceptionCopyright © 2013 Oracle Corporation. All Rights Reserved.