Package org.apache.batik.util.io
Class UTF16Decoder
- java.lang.Object
-
- org.apache.batik.util.io.AbstractCharDecoder
-
- org.apache.batik.util.io.UTF16Decoder
-
- All Implemented Interfaces:
CharDecoder
public class UTF16Decoder extends AbstractCharDecoder
This class represents an object which decodes UTF-16 characters from a stream of bytes.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
bigEndian
Whether the stream's byte-order is big-endian.-
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 Constructor Description UTF16Decoder(java.io.InputStream is)
Creates a new UTF16Decoder.UTF16Decoder(java.io.InputStream is, boolean be)
Creates a new UTF16Decoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
readChar()
Reads the next character.-
Methods inherited from class org.apache.batik.util.io.AbstractCharDecoder
charError, dispose, endOfStreamError, fillBuffer
-
-
-
-
Constructor Detail
-
UTF16Decoder
public UTF16Decoder(java.io.InputStream is) throws java.io.IOException
Creates a new UTF16Decoder. It is assumed that the byte-order mark is present.- Parameters:
is
- The stream to decode.- Throws:
java.io.IOException
-
UTF16Decoder
public UTF16Decoder(java.io.InputStream is, boolean be)
Creates a new UTF16Decoder.- Parameters:
is
- The stream to decode.be
- Whether or not the given stream's byte-order is big-endian.
-
-