RMemWriteStream Class Reference

class RMemWriteStream : public RWriteStream

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

TMemBuf RWriteStream

Inherits from

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> .

MExternalizer CStoreMap

Parameters

const MExternalizer < TStreamRef > & anExter Specifies an externalizer.

RMemWriteStream(TAny *, TInt)

IMPORT_C RMemWriteStream ( TAny * aPtr,
TInt aMaxLength
)

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.

RMemWriteStream::Open

Parameters

TAny * aPtr The start address for the area of memory that is the sink of this stream.
TInt aMaxLength The maximum length of the area of memory.

Member Functions Documentation

Open(TAny *, TInt)

IMPORT_C void Open ( TAny * aPtr,
TInt aMaxLength
)

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()

TMemBuf::Set RWriteStream::Attach

Parameters

TAny * aPtr The start address for the area of memory that is the sink of this stream.
TInt aMaxLength The maximum length of the area of memory.

Member Data Documentation

TMemBuf iSink

TMemBuf iSink [private]