Package 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
This class represents an object which decodes UTF-8 characters from
a stream of bytes.
- Version:
- $Id: UTF8Decoder.java 1808001 2017-09-11 09:51:29Z ssteiner $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The next char, in case of a 4 bytes sequence.protected static final byte[]
The number of bytes of a UTF-8 sequence indexed by the first byte of the sequence.Fields inherited from class org.apache.batik.util.io.AbstractCharDecoder
buffer, BUFFER_SIZE, count, inputStream, position
Fields inherited from interface org.apache.batik.util.io.CharDecoder
END_OF_STREAM
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.batik.util.io.AbstractCharDecoder
charError, dispose, endOfStreamError, fillBuffer
-
Field Details
-
UTF8_BYTES
protected static final byte[] UTF8_BYTESThe number of bytes of a UTF-8 sequence indexed by the first byte of the sequence. -
nextChar
protected int nextCharThe next char, in case of a 4 bytes sequence.
-
-
Constructor Details
-
UTF8Decoder
Creates a new UTF8Decoder.
-
-
Method Details
-
readChar
Reads the next character.- Returns:
- a character or END_OF_STREAM.
- Throws:
IOException
-