|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.dalsemi.io.ByteToCharConverter
|
+--com.dalsemi.io.ByteToCharISO8859_1
| Constructor Summary | |
ByteToCharISO8859_1()
|
|
| Method Summary | |
int |
convert(byte[] src,
int srcStart,
int srcEnd,
char[] dst,
int dstStart,
int dstEnd)
Converts the specified byte array into a char array based on
this ByteToCharConverter's encoding scheme. |
int |
flush(char[] buff,
int start,
int end)
Tells the ByteToCharConverter to convert
any unconverted data it has internally stored. |
int |
getMaxCharCount(byte[] forThis,
int start,
int end)
Returns the number of characters that the specified byte
sequence will require for encoding. |
java.lang.String |
getName()
Returns the name of this encoding scheme. |
| Methods inherited from class com.dalsemi.io.ByteToCharConverter |
getConverter, getDefaultConverter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ByteToCharISO8859_1()
| Method Detail |
public 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 ByteToCharConvertercom.dalsemi.io.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).byte sequenceByteToCharConverter.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 ByteToCharConvertercom.dalsemi.io.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.java.io.CharConversionException - if an illegal byte sequence is encountered
that cannot be convertedByteToCharConverter.getMaxCharCount(byte[],int,int),
ByteToCharConverter.flush(char[],int,int)
public int flush(char[] buff,
int start,
int end)
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 ByteToCharConvertercom.dalsemi.io.ByteToCharConverterbuff - the destination character arraystart - the next available offset into the destination arrayend - offset in the destination array to stop placing data
(may be ignored by some algorithms)flush()java.io.CharConversionException - if an illegal character is encountered that cannot be convertedByteToCharConverter.convert(byte[],int,int,char[],int,int)public java.lang.String getName()
ByteToCharConvertergetName in class ByteToCharConvertercom.dalsemi.io.ByteToCharConverter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||