/MEng/System/Runtime/TextInStream

ClassPath:MEng.System.Runtime.TextInStream
Parent ClassPath:MEng.Object
Copyable:No
Final:No

MEng.System.Runtime.TextInStream is a base class from which a set of input text streams are derived. An input text stream allows you to parse lines of text from some input source. The source is managed by the derived classes. This class provides the input streaming interface and the derived classes just manage the source buffer.

 

Constructors:

No constructors are exposed at the macro level. You cannot create a class of this type directly.

 

Final, Non-Const Methods:

EndOfStream();

Returns true if this input stream is at the end of input, which means that any subsequent attempt to stream in more text will throw an end of stream exception.

GetLine([Out] MEng.String ToFill);

This method will read in the next line of text from the input stream and put it into ToFill. Any newline terminator is removed. Leading and trailing space are not.

Reset();

Resets the input stream back to the start of the input. So if the actual derived class you are using is a file, it seeks back to the start of the file. If a string, it resets the current index back to zero, and so forth.

On some types of derived classes, this will have no effect since it is meaningless. A console or socket based input stream, for instance, cannot be 'rewound' backwards, since it is literally a stream of data, not a buffer or file that can be reset again.