#include <rtstreams.h>
Inheritance diagram for lrt::InputStream:

Public Methods | |
| virtual bool | markSupported () |
| Returns whether marking and resetting a position in the stream is supported. More... | |
| virtual void | mark () |
| Saves the current position in the stream for later restoring it. More... | |
| virtual void | reset () |
If possible, restores the stream position saved by mark(). More... | |
| virtual int | read ()=0 |
| Reads a byte from the stream. More... | |
| virtual int | read (Array< char > &b, int off, int len) |
| Reads up to len bytes from the stream, storing them in b, beginning at position off. More... | |
| int | read (Array< char > &b) |
| Tries to fill the array b with bytes from the stream. More... | |
| virtual bool | eos ()=0 |
| Checks if this stream's end has been reached. More... | |
| virtual bool | fail () |
| Returns true if there was some system failure for this stream (such as, it couldn't be opened). | |
| virtual void | close () |
| Closes the stream, and releases any system resources. More... | |
| virtual | ~InputStream () |
| Destroys the stream. More... | |
Protected Methods | |
| InputStream () | |
| protected ////. More... | |
Protected Attributes | |
| bool | _fail |
Set _fail, if a system-dependent operation for this stream (such as opening) fails. | |
Since this abstract input stream does not implement any source of data, it is impossible to construct one. For useful concrete input streams, look at the following classes:
|
|
Destroys the stream.
The destructor of class |
|
|
protected ////.
The constructor of class |
|
|
Closes the stream, and releases any system resources.
Closed streams cannot be re-opened. The close method of class Reimplemented in rt::DefineInputStream. |
|
|
Checks if this stream's end has been reached. This method must be implemented by subclassers!
Implemented in rt::DefineInputStream. |
|
|
Saves the current position in the stream for later restoring it.
Note that if marking is not supported,
Reimplemented in rt::DefineInputStream. |
|
|
Returns whether marking and resetting a position in the stream is supported. The markSupported method of class InputStream always returns false.
Reimplemented in rt::DefineInputStream. |
|
|
Tries to fill the array b with bytes from the stream. Note: You need never subclass this method.
|
|
||||||||||||||||
|
Reads up to len bytes from the stream, storing them in b, beginning at position off. Note that b must be large enough.
Reimplemented in lrt::NetworkInputStream. |
|
|
Reads a byte from the stream. If the stream cannot be read (or is EOF), this method returns -1. This method must be implemented by subclassers!
Implemented in rt::DefineInputStream. |
|
|
If possible, restores the stream position saved by
If marking is not supported,
Reimplemented in rt::DefineInputStream. |