APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.util.xml.impl

public Class ReaderUTF16

extends Reader
Class Inheritance
Imports
java.io.Reader, .InputStream, .IOException

UTF-16 encoded stream reader.

Field Summary

Modifier and TypeField and Description
private char
private InputStream
Inherited from java.io.Reader:
lock

Constructor Summary

AccessConstructor and Description
public
ReaderUTF16(InputStream
A byte input stream.
is
,
char
A byte order in the input stream.
bo
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract java.io.Reader.close.

Implements java.io.Closeable.close.

Closes the stream.

public int
read(char[]
Destination buffer.
cbuf
,
int
Offset at which to start storing characters.
off
,
int
Maximum number of characters to read.
len
)

Implements abstract java.io.Reader.read.

Reads characters into a portion of an array.

public int

Returns:

The character read, as an integer in the range 0 to 65535 (0x0000-0xffff), or -1 if the end of the stream has been reached.
read
()

Overrides java.io.Reader.read.

Reads a single character.

Inherited from java.io.Reader:
markmarkSupportednullReaderofreadreadreadAllAsStringreadAllLinesreadyresetskiptransferTo

Field Detail

boback to summary
private char bo
isback to summary
private InputStream is

Constructor Detail

ReaderUTF16back to summary
public ReaderUTF16(InputStream is, char bo)

Constructor. Byte order argument can be: 'l' for little-endian or 'b' for big-endian.

Parameters
is:InputStream

A byte input stream.

bo:char

A byte order in the input stream.

Method Detail

closeback to summary
public void close() throws IOException

Implements abstract java.io.Reader.close.

Implements java.io.Closeable.close.

Closes the stream.

Exceptions
IOException:
If any IO errors occur.
readback to summary
public int read(char[] cbuf, int off, int len) throws IOException

Implements abstract java.io.Reader.read.

Reads characters into a portion of an array.

Parameters
cbuf:char[]

Destination buffer.

off:int

Offset at which to start storing characters.

len:int

Maximum number of characters to read.

Exceptions
IOException:
If any IO errors occur.
readback to summary
public int read() throws IOException

Overrides java.io.Reader.read.

Reads a single character.

Returns:int

The character read, as an integer in the range 0 to 65535 (0x0000-0xffff), or -1 if the end of the stream has been reached.

Exceptions
IOException:
If any IO errors occur.