org.apache.batik.util.io
Class UTF8Decoder
java.lang.Object
org.apache.batik.util.io.AbstractCharDecoder
org.apache.batik.util.io.UTF8Decoder
- All Implemented Interfaces:
- CharDecoder
public class UTF8Decoder
- extends AbstractCharDecoder
This class represents an object which decodes UTF-8 characters from
a stream of bytes.
Field Summary |
protected int |
nextChar
The next char, in case of a 4 bytes sequence. |
protected static byte[] |
UTF8_BYTES
The number of bytes of a UTF-8 sequence indexed by the first
byte of the sequence. |
Method Summary |
int |
readChar()
Reads the next character. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UTF8_BYTES
protected static final byte[] UTF8_BYTES
- The number of bytes of a UTF-8 sequence indexed by the first
byte of the sequence.
nextChar
protected int nextChar
- The next char, in case of a 4 bytes sequence.
UTF8Decoder
public UTF8Decoder(InputStream is)
- Creates a new UTF8Decoder.
readChar
public int readChar()
throws IOException
- Reads the next character.
- Returns:
- a character or END_OF_STREAM.
- Throws:
IOException
Copyright © 2008 Apache Software Foundation. All Rights Reserved.