|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.buf.C2BConverter
public final class C2BConverter
Efficient conversion of character to bytes. This uses the standard JDK mechanism - a writer - but provides mechanisms to recycle all the objects that are used. Input is buffered to improve performance.
Constructor Summary | |
---|---|
C2BConverter(ByteChunk output,
String encoding)
Create a converter, with bytes going to a byte buffer. |
|
C2BConverter(String encoding)
Deprecated. Unused. Will be removed in Tomcat 8.0.x onwards. |
Method Summary | |
---|---|
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)
Deprecated. Unused. Will be removed in Tomcat 8.0.x onwards. |
void |
convert(String s)
Generate the bytes using the specified encoding. |
void |
convert(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()
Deprecated. Unused. Will be removed in Tomcat 8.0.x onwards. |
String |
getEncoding()
Deprecated. Unused. Will be removed in Tomcat 8.0.x onwards. |
void |
recycle()
Reset the internal state, empty the buffers. |
void |
setByteChunk(ByteChunk bb)
Deprecated. Unused. Will be removed in Tomcat 8.0.x onwards. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public C2BConverter(ByteChunk output, String encoding) throws IOException
IOException
@Deprecated public C2BConverter(String encoding) throws IOException
IOException
Method Detail |
---|
@Deprecated public ByteChunk getByteChunk()
@Deprecated public String getEncoding()
@Deprecated public void setByteChunk(ByteChunk bb)
public final void recycle()
public final void convert(char[] c, int off, int len) throws IOException
IOException
public final void convert(String s, int off, int len) throws IOException
IOException
public final void convert(String s) throws IOException
IOException
public final void convert(char c) throws IOException
IOException
@Deprecated public final void convert(MessageBytes mb) throws IOException
IOException
public final void flushBuffer() throws IOException
IOException
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |