public class ByteToCharUTF8 extends ByteToCharConverter
| Constructor and Description | 
|---|
| ByteToCharUTF8() | 
| Modifier and Type | Method and Description | 
|---|---|
| int | convert(byte[] src,
       int srcStart,
       int srcEnd,
       char[] dst,
       int dstStart,
       int dstEnd)Converts the specified  bytearray into achararray based on
 thisByteToCharConverter's encoding scheme. | 
| int | flush(char[] buff,
     int start,
     int length)Tells the  ByteToCharConverterto convert
 any unconverted data it has internally stored. | 
| int | getMaxCharCount(byte[] forThis,
               int start,
               int end)Returns the number of characters that the specified  bytesequence will require for encoding. | 
| String | getName()Returns the name of this encoding scheme. | 
getConverter, getDefaultConverterpublic int getMaxCharCount(byte[] forThis,
                           int start,
                           int end)
ByteToCharConverterbyte
 sequence will require for encoding.  For instance, in UTF8
 encoding, a one, two, or three byte sequence may encode to
 one char.  This method should always be called before the
 convert() method.  The value returned may not be the actual
 number of converted characters that will be produced due to
 conversion errors, but it will be the maximum that will be
 produced.getMaxCharCount in class ByteToCharConverterforThis - the byte sequence to determine the
 required encoding sizestart - offset into the byte array to begin processingend - the ending offset in the byte array to stop processing.
 The number of processed bytes will then be (end-start).ByteToCharConverter.convert(byte[],int,int,char[],int,int)public int convert(byte[] src,
                   int srcStart,
                   int srcEnd,
                   char[] dst,
                   int dstStart,
                   int dstEnd)
ByteToCharConverterbyte array into a char array based on
 this ByteToCharConverter's encoding scheme.  getMaxCharCount() should
 always be called first to find out how much room is required in the
 destination char array.convert in class ByteToCharConvertersrc - the same byte array passed to getMaxCharCount()srcStart - the same starting offset as passed to getMaxCharCount()srcEnd - the same ending offset as passed to getMaxCharCount()dst - the destination character array.dstStart - the offset to begin storing converted bytes in the
 destination arraydstEnd - the ending location for storing converted bytes into the
 destination array.  This argument may usually be ignored, as
 the algorithm may choose to continue converting bytes until
 finished.ByteToCharConverter.getMaxCharCount(byte[],int,int), 
ByteToCharConverter.flush(char[],int,int)public int flush(char[] buff,
                 int start,
                 int length)
          throws CharConversionException
ByteToCharConverterByteToCharConverter to convert
 any unconverted data it has internally stored.
 Some ByteToCharConverter's will store state between
 calls to convert().  Since the converter may be left in
 an unknown state, the converter should be flushed to
 notify it that no more input will be received.  The converter
 can handle any unfinished conversions before its output is
 used.flush in class ByteToCharConverterlength - ?buff - the destination character arraystart - the next available offset into the destination arrayCharConversionException - ?ByteToCharConverter.convert(byte[],int,int,char[],int,int)public String getName()
ByteToCharConvertergetName in class ByteToCharConverter