com.sun.grizzly.util.buf
Class B2CConverter

java.lang.Object
  extended by com.sun.grizzly.util.buf.B2CConverter
Direct Known Subclasses:
UTF8Decoder

public class B2CConverter
extends Object

Efficient conversion of bytes to character . Now uses NIO directly


Constructor Summary
protected B2CConverter()
           
  B2CConverter(String encoding)
          Create a converter, with bytes going to a byte buffer
 
Method Summary
 void convert(ByteChunk bb, CharChunk cb)
          Deprecated.  
 void convert(ByteChunk bb, CharChunk cb, int limit)
           
static void convertASCII(MessageBytes mb)
          Character conversion of a US-ASCII MessageBytes.
protected  void init(String encoding)
           
 void recycle()
          Reset the internal state, empty the buffers.
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Deprecated. 

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


Copyright © 2012 Oracle Corporation. All Rights Reserved.