Class B2CConverter


  • public class B2CConverter
    extends java.lang.Object
    Efficient conversion of bytes to character . Now uses NIO directly
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected B2CConverter()  
        B2CConverter​(java.lang.String encoding)
      Create a converter, with bytes going to a byte buffer
    • Constructor Detail

      • B2CConverter

        protected B2CConverter()
      • B2CConverter

        public B2CConverter​(java.lang.String encoding)
                     throws java.io.IOException
        Create a converter, with bytes going to a byte buffer
        Throws:
        java.io.IOException
    • Method Detail

      • init

        protected void init​(java.lang.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 java.io.IOException
        Convert a buffer of bytes into a chars
        Throws:
        java.io.IOException
      • convert

        public void convert​(ByteChunk bb,
                            CharChunk cb,
                            int limit)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • convertASCII

        public static void convertASCII​(MessageBytes mb)
        Character conversion of a US-ASCII MessageBytes.
      • reset

        public void reset()
                   throws java.io.IOException
        Throws:
        java.io.IOException