ByteStream.h

Input/output classes

o ByteStream
Abstract class for a stream of bytes.
o StdioByteStream
ByteStream interface for stdio files.
o MemoryByteStream
ByteStream interface managing a memory buffer.
o StaticByteStream
Read-only ByteStream interface to a memory area.
Files "ByteStream.h" and "ByteStream.cpp" define input/output classes similar in spirit to the well known C++ ByteStream is an abstract base class for all byte streams. It defines a virtual interface and also provides useful functions. These files provide two subclasses. Class StdioByteStream provides a simple interface to the Ansi C buffered input/output functions. Class MemoryByteStream provides stream-like access to a dynamical array maintained in memory. Class StaticByteStream provides read-only stream-like access to a user allocated data buffer.

Notes --- These classes were partly written because we did not want to depend on the standard C++ library. The main reason however is related to the browser interface. We want to have a tight control over the implementation of subclasses because we want to use a byte stream to represent data passed by a web browser to a plugin. This operation involves multi-threading issues that many implementations of the standard C++ library would squarely ignore.

Author:
Léon Bottou <leonb@research.att.com> -- initial implementation
Andrei Erofeev <eaf@research.att.com> --
Version:
$Id: ByteStream.h.html,v 1.2 2000/08/26 00:09:29 bcr Exp $

Alphabetic index Hierarchy of classes