Class C2BConverter


  • public final class C2BConverter
    extends Object
    NIO based character encoder.
    • Constructor Detail

      • C2BConverter

        public C2BConverter​(Charset charset)
    • Method Detail

      • recycle

        public void recycle()
        Reset the encoder state.
      • isUndeflow

        public boolean isUndeflow()
      • convert

        public void convert​(CharChunk cc,
                            ByteChunk bc)
                     throws IOException
        Convert the given characters to bytes.
        Parameters:
        cc - char input
        bc - byte output
        Throws:
        IOException - An encoding error occurred
      • convert

        public void convert​(CharBuffer cc,
                            ByteBuffer bc)
                     throws IOException
        Convert the given characters to bytes.
        Parameters:
        cc - char input
        bc - byte output
        Throws:
        IOException - An encoding error occurred
      • getCharset

        public Charset getCharset()