borland Packages  Class Hierarchy  jb.io Package 

AsciiInputStream class

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

About the AsciiInputStream class

Constructors  Properties  Methods  

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

Note that under Western European versions of Windows, including the United States version, the javac compiler assumes the encoding of 8859_1, even though the actual encoding should be Cp1252. Cp1252 contains some characters that are not in 8859_1. If your source file contains these additional characters, they will not be correctly interpreted. In this case, you should specify Cp1252 as the encoding.


AsciiInputStream constructors

AsciiInputStream properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

AsciiInputStream methods

Methods implemented in this class

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

Methods implemented in java.lang.Object


AsciiInputStream constructors

AsciiInputStream(java.io.InputStream)

  public AsciiInputStream(InputStream in)
Creates a new buffered stream with a default buffer size of 2048 characters.

Parameters:

in
The input stream.

AsciiInputStream(java.io.InputStream, int)

  public AsciiInputStream(InputStream in, int size)
Creates a new buffered stream with the specified buffer size.

Parameters:

in
The input stream.
size
The buffer size.

AsciiInputStream methods

close()

  public void close()
Closes the 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.AsciiOutputStream.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)