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 Details

    • B2CConverter

      protected B2CConverter()
    • B2CConverter

      public B2CConverter(String encoding) throws IOException
      Create a converter, with bytes going to a byte buffer
      Throws:
      IOException
  • Method Details

    • 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