All Packages Class Hierarchy This Package Previous Next Index
Class sun.io.ByteToCharSingleByte
java.lang.Object
|
+----sun.io.ByteToCharConverter
|
+----sun.io.ByteToCharSingleByte
- public abstract class ByteToCharSingleByte
- extends ByteToCharConverter
A table driven conversion from byte to char for single byte character sets.
The needed data tables will reside in a character set specific subclass.
-
byteToCharTable
- Mapping table.
-
ByteToCharSingleByte()
-
-
convert(byte[], int, int, char[], int, int)
- Converts bytes to characters according to the selected character
encoding.
-
flush(char[], int, int)
- Writes any remaining output to the output buffer and resets the
converter to its initial state.
-
reset()
- Resets the converter.
byteToCharTable
protected char byteToCharTable[]
- Mapping table. Values supplied by subclass
ByteToCharSingleByte
public ByteToCharSingleByte()
flush
public int flush(char output[],
int outStart,
int outEnd)
- Writes any remaining output to the output buffer and resets the
converter to its initial state.
- Overrides:
- flush in class ByteToCharConverter
convert
public int convert(byte input[],
int inOff,
int inEnd,
char output[],
int outOff,
int outEnd) throws UnknownCharacterException, MalformedInputException, ConversionBufferFullException
- Converts bytes to characters according to the selected character
encoding.
Maintains internal state, so that conversions that result in
exceptions can be restarted by calling convert again, with
appropriately modified parameters.
Call reset before converting input that is not a continuation of
the previous call.
- Parameters:
- input - byte array containing text in character set
- inStart - offset in input array
- inEnd - offset of last byte to be converted
- output - character array to receive conversion result
- outStart - starting offset
- outEnd - offset of last character to be written to
- Returns:
- the number of characters written to output.
- Overrides:
- convert in class ByteToCharConverter
- See Also:
- reset
reset
public void reset()
- Resets the converter.
Call this method to reset the converter to its initial state
- Overrides:
- reset in class ByteToCharConverter
All Packages Class Hierarchy This Package Previous Next Index