com.faunos.util.io
Class Utf8Codec<T extends RuntimeException>

java.lang.Object
  extended by com.faunos.util.io.Utf8Codec<T>

public class Utf8Codec<T extends RuntimeException>
extends Object

Aid for the memory-impaired to encode and decode buffers to and from the UTF-8 format. Instances must be accessed serially.

Warning: the behavior of this class is undefined under concurrent access.

Author:
Babak Farhang

Constructor Summary
Utf8Codec(Class<T> exceptionClass)
           
 
Method Summary
 int decode(ByteBuffer in, CharBuffer out)
           
 int encode(CharBuffer in, ByteBuffer out)
           
 int encode(CharSequence in, ByteBuffer out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utf8Codec

public Utf8Codec(Class<T> exceptionClass)
Method Detail

encode

public int encode(CharSequence in,
                  ByteBuffer out)

encode

public int encode(CharBuffer in,
                  ByteBuffer out)

decode

public int decode(ByteBuffer in,
                  CharBuffer out)


SourceForge.net Logo