Creates an instance of an
oeistream. This class is designed to
provide an interface and some functionality; however, this
class does not define a data source and therefore instances
of this class have no independent functionality.

Use of these operators executes the specified function (‘f’) on
the stream in question. In order for proper compilation and
execution, the specified function must be prototyped according
to the API shown above.

oeistream&operator>>(oeostream&)

Sends all of the remaining input on the stream to the specified
oeostream.

These operators read the next whitespace-delimited token on the
input stream, converts it into the appropriate data type, and
stores that value in the specified parameter. The use of these
operators on non-text streams is undefined.

Retrieves the next text line from the stream and directly copies
its contents into the ‘buffer’ parameter. The newline character is
not copied with the rest of the contents, though a null
terminator, ‘0’, is placed at the end of the contents. The ‘max’ parameter
specifies the maximum size of the memory passed in as the
‘buffer’ argument. If a newline character is not found within
‘max - 1’ characters, only the specified number of characters will be copied
into the buffer and all the remaining characters in the stream
before the next newline character will be discarded.

Retrieves the next whitespace delimited token from the stream and
directly copies its contents into the ‘buffer’ parameter. This
function discards the whitespace characters read when searching for
the next token. The ‘max’ parameter specifies the maximum number of
characters allowed per token. If a whitespace character is not
found within the specified number of characters, only the specified
number of characters will be copied into the buffer and all the
remaining characters in the stream before the next whitespace
character will be discarded.

Opens the input stream with data from the specified
sources. Passing a ‘name’ parameter will result in invocation of a
protected virtual method to appropriate handle the specified input
source. Passing a pointer to a character buffer along with the
buffer’s size will result in the stream wrapping the ‘buffer’ and
using that as the stream data source. Returns whether or not data
can now be read from the stream.

Reads the next len number of bytes off of the stream, stores them
in the specified ‘buffer’ and returns the number of bytes actually
read. It is the user’s responsibility when using any of the three
char* versions to make sure that the specified ‘buffer’ has been
properly allocated and has enough room to store len bytes. This
function does not add a NULL terminator to the end of the
buffer.

The version that takes a std::string without a size will
read the entire contents of the stream into the string, or until
std::bad_alloc is thrown when the system runs out of
memory.