All Packages Class Hierarchy This Package Previous Next Index
Class sun.io.CharToByteSingleByte
java.lang.Object
|
+----sun.io.CharToByteConverter
|
+----sun.io.CharToByteSingleByte
- public abstract class CharToByteSingleByte
- extends CharToByteConverter
A table driven conversion from char to byte for single byte
character sets. Tables will reside in the class CharToByteYYYYY,
where YYYYY is a unique character set identifier
< TBD: Tables are of the form... >
-
badInputLength
-
-
index1
-
-
index2
-
-
mask1
-
-
mask2
-
-
shift
-
-
CharToByteSingleByte()
-
-
canConvert(char)
- Return whether a character is mappable or not
-
convert(char[], int, int, byte[], int, int)
- Converts characters to sequences of bytes.
-
flush(byte[], int, int)
- Writes any remaining output to the output buffer and resets the
converter to its initial state.
-
getMaxBytesPerChar()
- the maximum number of bytes needed to hold a converted char
-
reset()
- Resets the converter.
index1
protected short index1[]
index2
protected byte index2[]
mask1
protected int mask1
mask2
protected int mask2
shift
protected int shift
badInputLength
protected int badInputLength
CharToByteSingleByte
public CharToByteSingleByte()
flush
public int flush(byte output[],
int outStart,
int outEnd) throws MalformedInputException
- Writes any remaining output to the output buffer and resets the
converter to its initial state.
- Overrides:
- flush in class CharToByteConverter
convert
public int convert(char input[],
int inOff,
int inEnd,
byte output[],
int outOff,
int outEnd) throws MalformedInputException, UnknownCharacterException, ConversionBufferFullException
- Converts characters to sequences of bytes.
Conversions that result in Exceptions can be restarted by calling
convert again, with appropriately modified parameters.
- Parameters:
- input - char array containing text in Unicode
- inStart - offset in input array
- inEnd - offset of last byte to be converted
- output - byte array to receive conversion result
- outStart - starting offset
- outEnd - offset of last byte to be written to
- Returns:
- the characters written to output.
- Overrides:
- convert in class CharToByteConverter
getMaxBytesPerChar
public int getMaxBytesPerChar()
- the maximum number of bytes needed to hold a converted char
- Returns:
- s the maximum number of bytes needed for a converted char
- Overrides:
- getMaxBytesPerChar in class CharToByteConverter
reset
public void reset()
- Resets the converter.
Call this method to reset the converter to its initial state
- Overrides:
- reset in class CharToByteConverter
canConvert
public boolean canConvert(char ch)
- Return whether a character is mappable or not
- Returns:
- true if a character is mappable
- Overrides:
- canConvert in class CharToByteConverter
All Packages Class Hierarchy This Package Previous Next Index