org.apache.batik.util.io

Class UTF16Decoder

public class UTF16Decoder extends AbstractCharDecoder

This class represents an object which decodes UTF-16 characters from a stream of bytes.
Field Summary
protected booleanbigEndian
Whether the stream's byte-order is big-endian.
Constructor Summary
UTF16Decoder(InputStream is)
Creates a new UTF16Decoder.
UTF16Decoder(InputStream is, boolean be)
Creates a new UTF16Decoder.
Method Summary
intreadChar()
Reads the next character.

Field Detail

bigEndian

protected boolean bigEndian
Whether the stream's byte-order is big-endian.

Constructor Detail

UTF16Decoder

public UTF16Decoder(InputStream is)
Creates a new UTF16Decoder. It is assumed that the byte-order mark is present.

Parameters: is The stream to decode.

UTF16Decoder

public UTF16Decoder(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.

Method Detail

readChar

public int readChar()
Reads the next character.

Returns: a character or END_OF_STREAM.

Copyright B) 2007 Apache Software Foundation. All Rights Reserved.