All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.ifarchive.glk.StreamReader

java.lang.Object
   |
   +----java.io.Reader
           |
           +----org.ifarchive.glk.StreamReader

public class StreamReader
extends Reader
This is a Reader that works on a Glk stream. The GLK stream must be open for input.


Constructor Index

 o StreamReader(Stream)
Create a StreamReader.

Method Index

 o close()
Close the stream.
 o getStream()
Returns the GLK stream associated with this StreamReader
 o read(char[], int, int)
Read characters from the stream into a portion of an array.

Constructors

 o StreamReader
 public StreamReader(Stream s)
Create a StreamReader. The underlying stream must have been opened in read mode.

Methods

 o getStream
 public Stream getStream()
Returns the GLK stream associated with this StreamReader

 o close
 public void close()
Close the stream.

Overrides:
close in class Reader
 o read
 public int read(char cbuf[],
                 int off,
                 int len)
Read characters from the stream into a portion of an array.

Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Overrides:
read in class Reader
See Also:
read

All Packages  Class Hierarchy  This Package  Previous  Next  Index