RMemWriteStream Class Reference

#include <s32mem.h>

class RMemWriteStream : public RWriteStream

Inherits from

Detailed Description

Supports the writing of a stream to a pointer of any type.

See also: TMemBuf RWriteStream

Constructor & Destructor Documentation

RMemWriteStream ( )

RMemWriteStream()[inline]

Constructs an empty write stream object.

Call Open() to prepare a stream for writing.

RMemWriteStream ( const MExternalizer< TStreamRef > & )

RMemWriteStream(const MExternalizer< TStreamRef > &anExter)[inline]

Constructs a write stream with an externalizer. For example, CStoreMap implements MExternalizer<TStreamRef>.

See also: MExternalizer CStoreMap

Parameters
anExterSpecifies an externalizer.

RMemWriteStream ( TAny *, TInt )

IMPORT_CRMemWriteStream(TAny *aPtr,
TIntaMaxLength
)

Constructs the RMemWriteStream object and prepares a stream to be hosted in the specified memory location (described by the TAny aPtr argument) for writing using the Open() function.

See also: RMemWriteStream::Open

Parameters
aPtrThe start address for the area of memory that is the sink of this stream.
aMaxLengthThe maximum length of the area of memory.

Member Function Documentation

Open ( TAny *, TInt )

IMPORT_C voidOpen(TAny *aPtr,
TIntaMaxLength
)

Prepares a stream for writing.

When streaming takes place any existing data in the memory location will be replaced. Note that the length of memory must be big enough to accommodate the expected streamed data otherwise the subsequent streaming operation will leave with KErrOverFlow.

To close the stream and free its resources call Close()

See also: TMemBuf::Set RWriteStream::Attach

Parameters
aPtrThe start address for the area of memory that is the sink of this stream.
aMaxLengthThe maximum length of the area of memory.