Package org.glassfish.grizzly.http.util
Class B2CConverter
- java.lang.Object
-
- org.glassfish.grizzly.http.util.B2CConverter
-
public class B2CConverter extends Object
Efficient conversion of bytes to character . Now uses NIO directly
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedB2CConverter()B2CConverter(String encoding)Create a converter, with bytes going to a byte buffer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvert(ByteChunk bb, CharChunk cb)Convert a buffer of bytes into a charsvoidconvert(ByteChunk bb, CharChunk cb, int limit)static voidconvertASCII(MessageBytes mb)Character conversion of a US-ASCII MessageBytes.protected voidinit(String encoding)voidrecycle()Reset the internal state, empty the buffers.voidreset()
-
-
-
Constructor Detail
-
B2CConverter
protected B2CConverter()
-
B2CConverter
public B2CConverter(String encoding) throws IOException
Create a converter, with bytes going to a byte buffer- Throws:
IOException
-
-
Method Detail
-
init
protected void init(String encoding)
-
recycle
public void recycle()
Reset the internal state, empty the buffers. The encoding remain in effect, the internal buffers remain allocated.
-
convert
public void convert(ByteChunk bb, CharChunk cb) throws IOException
Convert a buffer of bytes into a chars- Throws:
IOException
-
convert
public void convert(ByteChunk bb, CharChunk cb, int limit) throws IOException
- Throws:
IOException
-
convertASCII
public static void convertASCII(MessageBytes mb)
Character conversion of a US-ASCII MessageBytes.
-
reset
public void reset() throws IOException- Throws:
IOException
-
-