borland Packages  Class Hierarchy  jb.io Package 

EncodedInputStream class

java.lang.Object
   +----com.borland.jb.io.SimpleCharInputStream
           +----com.borland.jb.io.EncodedInputStream

About the EncodedInputStream class

Constructors  Properties  Methods  

An implementation of SimpleCharInputStream that is optimized for data where most of the characters belong to the specified character set. Other characters are assumed to be encoded in Unicode escapes.


EncodedInputStream constructors

EncodedInputStream properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

EncodedInputStream methods

Methods implemented in this class

Methods implemented in com.borland.jb.io.SimpleCharInputStream

Methods implemented in java.lang.Object


EncodedInputStream constructors

EncodedInputStream(java.io.InputStream)

  public EncodedInputStream(InputStream in)
Creates a new buffered stream with the default encoding and with a default buffer size of 2048 characters.

Parameters:

in
The input stream.

EncodedInputStream(java.io.InputStream, java.lang.String)

  public EncodedInputStream(InputStream in, String encoding)
Creates a new buffered stream with the specified encoding and with a default buffer size of 2048 characters.

Parameters:

in
The input stream.
encoding
The specified encoding.

EncodedInputStream(java.io.InputStream, java.lang.String, int)

  public EncodedInputStream(InputStream in, String encoding, int size)
Creates a new buffered stream with the specified encoding and buffer size.

Parameters:

in
The input stream.
encoding
The specified encoding.
size
The buffer size.

EncodedInputStream methods

close()

  public void close()
Closes the encoded input stream. Should be the last operation done with this object.

Overrides: com.borland.jb.io.SimpleCharInputStream.close()

read()

  public int read()
Reads a byte of data. This method will block if no input is available. This method returns the byte read, or -1 if the end of the stream is reached. If an I/O error occurrs, read() throws an IOException.

See also: com.borland.jb.io.EncodedOutputStream.write(int)

Overrides: com.borland.jb.io.SimpleCharInputStream.read()

unread(int)

  public void unread(int undoChar)
"Pushes" the given character back into the input buffer so the next read() will return it.

Parameters:

undoChar
The given character.

Overrides: com.borland.jb.io.SimpleCharInputStream.unread(int)