|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsun.io.CharToByteConverter
sun.io.CharToByteEUC_TW
public class CharToByteEUC_TW
| Field Summary | |
|---|---|
protected String |
cnsTab1
|
protected String |
cnsTab2
|
protected String |
uniTab1
Unicode table |
protected String |
uniTab2
|
| Fields inherited from class sun.io.CharToByteConverter |
|---|
badInputLength, byteOff, charOff, subBytes, subMode |
| Constructor Summary | |
|---|---|
CharToByteEUC_TW()
|
|
| Method Summary | |
|---|---|
boolean |
canConvert(char ch)
Returns true if the given character can be converted to the target character encoding. |
int |
convert(char[] input,
int inOff,
int inEnd,
byte[] output,
int outOff,
int outEnd)
Character conversion |
int |
flush(byte[] output,
int outStart,
int outEnd)
Writes any remaining output to the output buffer and resets the converter to its initial state. |
String |
getCharacterEncoding()
Return the character set ID |
int |
getMaxBytesPerChar()
returns the maximum number of bytes needed to convert a char |
protected int |
getNative(char unicode)
|
void |
reset()
Resets converter to its initial state. |
protected int |
searchTab(char code,
char[] table)
|
| Methods inherited from class sun.io.CharToByteConverter |
|---|
convertAll, convertAny, flushAny, getBadInputLength, getConverter, getDefault, nextByteIndex, nextCharIndex, setSubstitutionBytes, setSubstitutionMode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final String uniTab1
protected final String uniTab2
protected final String cnsTab1
protected final String cnsTab2
| Constructor Detail |
|---|
public CharToByteEUC_TW()
| Method Detail |
|---|
public int flush(byte[] output,
int outStart,
int outEnd)
throws MalformedInputException
CharToByteConverter
flush in class CharToByteConverteroutput - byte array to receive flushed output.outStart - start writing to output array at this offset.outEnd - stop writing to output array at this offset (exclusive).
MalformedInputException - if the output to be flushed contained
a partial or invalid multibyte character sequence. Will occur if the
input buffer on the last call to convert ended with the first character
of a surrogate pair. flush will write what it can to the output buffer
and reset the converter before throwing this exception. An additional
call to flush is not required.public void reset()
CharToByteConverter
reset in class CharToByteConverterpublic boolean canConvert(char ch)
CharToByteConverter
canConvert in class CharToByteConverterch - character to test
public int convert(char[] input,
int inOff,
int inEnd,
byte[] output,
int outOff,
int outEnd)
throws UnknownCharacterException,
MalformedInputException,
ConversionBufferFullException
convert in class CharToByteConverterinput - array containing Unicode characters to be converted.inOff - begin conversion at this offset in input array.inEnd - stop conversion at this offset in input array (exclusive).output - byte array to receive conversion result.outOff - start writing to output array at this offset.outEnd - stop writing to output array at this offset (exclusive).
UnknownCharacterException - for any character that
that cannot be converted to the external character encoding. Thrown
only when converter is not in substitution mode.
MalformedInputException - if the input buffer contains any
sequence of chars that is illegal in Unicode (principally unpaired
surrogates and ? or ?). After this exception is thrown,
the method nextCharIndex can be called to obtain the index of the
first invalid input character. The MalformedInputException can
be queried for the length of the invalid input.
ConversionBufferFullException - if output array is filled prior
to converting all the input.public int getMaxBytesPerChar()
getMaxBytesPerChar in class CharToByteConverterpublic String getCharacterEncoding()
getCharacterEncoding in class CharToByteConverterprotected int getNative(char unicode)
protected int searchTab(char code,
char[] table)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||