### IStreamIO

  IStreamIO is an abstract class that forms part of the implementation for an IDataStream. IStreamIO defines the protocol by which IDataStreams actually read and write primitive types; subclasses of IStreamIO define the actual format of the data as it appears on the stream.

  Each of the three stream encodings supported by the streaming subsystem (Interoperable Binary, Raw Binary, and Debug) is implemented by means of a specific concrete subclass or IStreamIO.

  From the point of view of a user of streaming, IStreamIO is an implementation detail and is not used directly.

### IStreamIO - Member Functions and Data by Group

### Constructors & Destructor

Use these members to create and delete streams.

~IStreamIO

      protected:
      virtual ~IStreamIO()

  Destructor which deletes the exception.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IStreamIO
  Construct a new exception.

  Overload 1

      protected:
      IStreamIO(const IStreamIO& other)

  This function constructs a copy of the given stream where `other` is the stream to copy.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      protected:
      IStreamIO()

  This function creates and initializes a new stream.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Establishing and Clearing Context

Use these members to establish and clear a stream context.

clearContext

      protected:
      virtual void clearContext() = 0

  This function clears a stream context.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

establishContext

      protected:
      virtual bool establishContext() = 0

  This function establishes a context for streaming and returns a bool.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Manipulating Streams

Use these members to set, reset, and flush a data stream.

flush

      protected:
      virtual void flush() = 0

  This function forces all data out through the stream buffer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

reset

      protected:
      virtual void reset() = 0

  This function resets the stream back to the beginning.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setStream

      protected:
      virtual void setStream(IDataStream* dataStream) = 0

  This function sets the data stream. It is called from the IDataStream constructor so that the IStreamIO can stream subobjects.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming Arrays

Use these members to stream arrays of primitive types.

readBytes

      protected:
      virtual void
        readBytes( char* data,
                   unsigned long howMany ) = 0

  This function streams in an array of bytes of data.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readDoubles

      protected:
      virtual void
        readDoubles( double* data,
                     unsigned long howMany ) = 0

  This function streams in an array of double-precision floating point values.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readFloats

      protected:
      virtual void
        readFloats( float* data,
                    unsigned long howMany ) = 0

  This function streams in an array of floating point values.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readLongs

      protected:
      virtual void
        readLongs( long* data,
                   unsigned long howMany ) = 0

  This function streams in an array of long integers.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readShorts

      protected:
      virtual void
        readShorts( short* data,
                    unsigned long howMany ) = 0

  This function streams in an array of short integers.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeBytes

      protected:
      virtual void
        writeBytes( const char* data,
                    unsigned long howMany ) = 0

  This function streams out the specified array of bytes of data.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeDoubles

      protected:
      virtual void
        writeDoubles( const double* data,
                      unsigned long howMany ) = 0

  This function streams out the specified array of double-precision floating point values.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeFloats

      protected:
      virtual void
        writeFloats( const float* data,
                     unsigned long howMany ) = 0

  This function streams out the specified array of floating point values.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeLongs

      protected:
      virtual void
        writeLongs( const long* data,
                    unsigned long howMany ) = 0

  This function streams out the specified array of long integers.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeShorts

      protected:
      virtual void
        writeShorts( const short* data,
                     unsigned long howMany ) = 0

  This function streams out the specified array of short integers.
  data
    The first element of the array.
  howMany
    The number of elements in the array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming Frames

Use these members to stream and detect the beginning and end of a stream frame.

atEndOfFrame

      protected:
      virtual bool atEndOfFrame() = 0

  This function detects the end of a stream frame and returns a bool.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readBeginFrame

      protected:
      virtual void readBeginFrame() = 0

  This function streams in the beginning of a stream frame.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readEndFrame

      protected:
      virtual void readEndFrame() = 0

  This function streams in the end of a stream frame.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeBeginFrame

      protected:
      virtual void writeBeginFrame() = 0

  This function streams out the beginning of a stream frame.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeEndFrame

      protected:
      virtual void writeEndFrame() = 0

  This function streams out the end of a stream frame.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming Objects

Use these members to stream streamable objects.

readAliasedObject

      protected:
      virtual bool
        readAliasedObject( IMStreamable *& object,
                           IMRefCounted *& refCounted,
                           const IStreamFinder* finder,
                           const ITypeRepresentation* typeRep ) = 0

  This function streams in an aliased, streamable object and returns a bool.
  object
    On return, a pointer to the object.
  refCounted
    On return, a pointer to the reference counted object.
  finder
    A pointer to the stream finder.
  typeRep
    A pointer to the type representation of the object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readObject

      protected:
      virtual IMStreamable*
        readObject( const IStreamFinder* finder,
                    const ITypeRepresentation* typeRep ) = 0

  This function streams in a streamable object.
  finder
    A pointer to the stream finder.
  typeRep
    A pointer to the type representation of the object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeAliasedObject

      protected:
      virtual bool
        writeAliasedObject( const IMStreamable* object,
                            const IMRefCounted* refCounted,
                            const ITypeRepresentation* typeRep ) = 0

  This function streams out the given aliased, streamable object and returns a bool.
  object
    A pointer to the object to stream.
  refCounted
    A pointer to the reference counted object.
  typeRep
    A pointer to the type representation of the object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeObject

      protected:
      virtual void
        writeObject( const IMStreamable* object,
                     const ITypeRepresentation* typeRep ) = 0

  This function streams out the given streamable object.
  object
    A pointer to the object to stream out.
  typeRep
    A pointer to the type representation of the object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming Primitive Types

Use these members to stream primitive types.

readByte

      protected:
      virtual char readByte() = 0

  This function streams in a byte of data.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readDouble

      protected:
      virtual double readDouble() = 0

  This function streams in a double-precision floating point value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readFloat

      protected:
      virtual float readFloat() = 0

  This function streams in a floating point value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readLong

      protected:
      virtual long readLong() = 0

  This function streams in a long integer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readShort

      protected:
      virtual short readShort() = 0

  This function streams in a short integer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeByte

      protected:
      virtual void writeByte(char source) = 0

  This function streams out the specified byte of data.
  source
    The value to stream out.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeDouble

      protected:
      virtual void writeDouble(double source) = 0

  This function streams out the specified double-precision floating point value.
  source
    The value to stream out.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeFloat

      protected:
      virtual void writeFloat(float source) = 0

  This function streams out the specified floating point value.
  source
    The value to stream out.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeLong

      protected:
      virtual void writeLong(long source) = 0

  This function streams out the specified long integer.
  source
    The value to stream out.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeShort

      protected:
      virtual void writeShort(short source) = 0

  This function streams out the specified short integer.
  source
    The value to stream out.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Supporting Subclasses

These members are used to support subclasses.

createUninitialized

      protected:
      static IMStreamable*
        createUninitialized( const IStreamFinder* finder,
                             const ITypeName& typeName,
                             IMRefCounted *& refCounted )

  This function is for the internal use of the Open Class Library. It should not be used by your own derived classes.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

findTypeRepresentation

      protected:
      static const ITypeRepresentation*
        findTypeRepresentation( const IStreamFinder* finder,
                                const ITypeName& typeName )

  This function is for the internal use of the Open Class Library. It should not be used by your own derived classes.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IStreamIO - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None