jd.io
Class CharToByteUtf8

java.lang.Object
  extended byjd.io.CharToByteConverter
      extended byjd.io.CharToByteUtf8

public class CharToByteUtf8
extends CharToByteConverter

An alternative to SUNs CharToByteUtf8-Converter.


Field Summary
 
Fields inherited from class jd.io.CharToByteConverter
badInputLength_, byteOff_, charOff_
 
Constructor Summary
CharToByteUtf8()
           
 
Method Summary
 boolean canConvert(char ch)
           
 int convert(char[] input, int inOff, int inEnd, byte[] output, int outOff, int outEnd)
           
 int flush(byte[] output, int outStart, int outEnd)
           
 String getCharacterEncoding()
           
 int getMaxBytesPerChar()
           
 void reset()
           
 
Methods inherited from class jd.io.CharToByteConverter
nextByteIndex, nextCharIndex, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharToByteUtf8

public CharToByteUtf8()
Method Detail

flush

public int flush(byte[] output,
                 int outStart,
                 int outEnd)
          throws CharConversionException
Specified by:
flush in class CharToByteConverter
Throws:
CharConversionException

convert

public int convert(char[] input,
                   int inOff,
                   int inEnd,
                   byte[] output,
                   int outOff,
                   int outEnd)
            throws ConversionBufferFullException,
                   CharConversionException
Specified by:
convert in class CharToByteConverter
Throws:
ConversionBufferFullException
CharConversionException

canConvert

public boolean canConvert(char ch)

getMaxBytesPerChar

public int getMaxBytesPerChar()
Specified by:
getMaxBytesPerChar in class CharToByteConverter

reset

public void reset()
Specified by:
reset in class CharToByteConverter

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in class CharToByteConverter