Class Overview
Class for converting bytes to characters for the EUC-JP encoding in
linux. This converter supports the JIS0201 and the JIS0208 encoding and
omits support for the JIS212 encoding.
Summary
Public Methods |
int
|
convert(byte[] input, int inOff, int inEnd, char[] output, int outOff, int outEnd)
Converts sequences of bytes to characters.
|
int
|
flush(char[] output, int outStart, int outEnd)
Writes any remaining output to the output buffer and resets the
converter to its initial state.
|
String
|
getCharacterEncoding()
Returns the character set id for the conversion
|
void
|
reset()
Resets the converter.
|
[Expand]
Inherited Methods |
From class
sun.io.ByteToCharJIS0208
|
From class
sun.io.ByteToCharDoubleByte
char
|
convSingleByte(int b)
|
int
|
convert(byte[] input, int inOff, int inEnd, char[] output, int outOff, int outEnd)
Converts sequences of bytes to characters.
|
int
|
flush(char[] output, int outStart, int outEnd)
Writes any remaining output to the output buffer and resets the
converter to its initial state.
|
short[]
|
getIndex1()
|
String[]
|
getIndex2()
|
char
|
getUnicode(int byte1, int byte2)
|
void
|
reset()
Resets the converter.
|
|
From class
sun.io.ByteToCharConverter
abstract
int
|
convert(byte[] input, int inStart, int inEnd, char[] output, int outStart, int outEnd)
Converts an array of bytes containing characters in an external
encoding into an array of Unicode characters.
|
char[]
|
convertAll(byte[] input)
Converts an array of bytes containing characters in an external
encoding into an array of Unicode characters.
|
abstract
int
|
flush(char[] output, int outStart, int outEnd)
Writes any remaining output to the output buffer and resets the
converter to its initial state.
|
int
|
getBadInputLength()
Returns the length, in bytes, of the input which caused a
MalformedInputException.
|
abstract
String
|
getCharacterEncoding()
Returns the character set id for the conversion
|
static
ByteToCharConverter
|
getConverter(String encoding)
Returns appropriate ByteToCharConverter subclass instance.
|
static
ByteToCharConverter
|
getDefault()
Create an instance of the default ByteToCharConverter subclass.
|
int
|
getMaxCharsPerByte()
Returns the maximum number of characters needed to convert a byte.
|
int
|
nextByteIndex()
Returns the index of the byte just past the last byte successfully
converted by the previous call to convert.
|
int
|
nextCharIndex()
Returns the index of the character just past the last character
written by the previous call to convert.
|
abstract
void
|
reset()
Resets converter to its initial state.
|
void
|
setSubstitutionChars(char[] c)
sets the substitution character to use
|
void
|
setSubstitutionMode(boolean doSub)
Sets converter into substitution mode.
|
String
|
toString()
returns a string representation of the character conversion
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
public
ByteToCharEUC_JP_LINUX
()
Public Methods
public
int
convert
(byte[] input, int inOff, int inEnd, char[] output, int outOff, int outEnd)
Converts sequences of bytes to characters.
Conversions that result in Exceptions can be restarted by calling
convert again, with appropriately modified parameters.
Parameters
input
| byte array containing text in Double/single Byte |
inOff
| begin conversion at this offset in input array. |
inEnd
| offset of last byte to be converted |
output
| character array to receive conversion result |
outOff
| start writing to output array at this offset. |
outEnd
| offset of last byte to be written to |
Returns
- the characters written to output.
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.
Parameters
output
| char array to receive flushed output. |
outStart
| start writing to output array at this offset. |
outEnd
| stop writing to output array at this offset (exclusive). |
public
String
getCharacterEncoding
()
Returns the character set id for the conversion
public
void
reset
()
Resets the converter.
Call this method to reset the converter to its initial state
Protected Methods
protected
char
convSingleByte
(int b)
protected
char
getUnicode
(int byte1, int byte2)