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.
-
StreamReader(Stream)
- Create a StreamReader.
-
close()
- Close the stream.
-
getStream()
- Returns the GLK stream associated with this StreamReader
-
read(char[], int, int)
- Read characters from the stream into a portion of an array.
StreamReader
public StreamReader(Stream s)
- Create a StreamReader. The underlying stream must have been
opened in read mode.
getStream
public Stream getStream()
- Returns the GLK stream associated with this StreamReader
close
public void close()
- Close the stream.
- Overrides:
- close in class Reader
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