RBufWriteStream Class Reference

#include <s32mem.h>

class RBufWriteStream : public RWriteStream

Inherits from

Detailed Description

Supports the writing of a stream to a dynamic buffer. The stream does not take ownership of the dynamic buffer, which means that the creator is responsible for deleting the buffer when it is no longer needed.

See also: TBufBuf RWriteStream

Constructor & Destructor Documentation

RBufWriteStream ( )

RBufWriteStream()[inline]

Default constructor. Constructs an empty write stream object.

Call Open(), Truncate() or Insert() to prepare a stream for writing.

RBufWriteStream ( const MExternalizer< TStreamRef > & )

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

RBufWriteStream ( CBufBase &, TInt )

IMPORT_CRBufWriteStream(CBufBase &aBuf,
TIntaPos = 0
)

Constructs the RBufWriteStream object and opens a stream that writes to the specified dynamic buffer using the Open() function.

See also: RBufWriteStream::Open

Parameters
aBufThe dynamic buffer hosting the stream.
aPosThe offset within the dynamic buffer where the stream is to start. Defaults to zero, if not explicitly specified. The value cannot be greater than the current size of the buffer, otherwise a E32USER-CBase 5 panic will be raised when streaming starts.

Member Function Documentation

Append ( CBufBase & )

voidAppend(CBufBase &aBuf)[inline]

Open a stream that writes to the dynamic buffer specified in the aBuf argument using insert mode.

See also: RBufWriteStream::Insert

Parameters
aBufThe dynamic buffer that will be the source of this stream.

Insert ( CBufBase &, TInt )

IMPORT_C voidInsert(CBufBase &aBuf,
TIntaPos
)

Open a stream that writes into the dynamic buffer specified in the aBuf argument using insert mode.

See also: TBufBuf::Set TBufBuf::EInsert RWriteStream::Attach

Parameters
aBufThe dynamic buffer hosting the stream.
aPosThe offset within the dynamic buffer where the stream is to start. Defaults to zero, if not explicitly specified. The value cannot be greater than the current size of the buffer, otherwise a E32USER-CBase 5 panic will be raised when streaming starts.

Open ( CBufBase &, TInt )

IMPORT_C voidOpen(CBufBase &aBuf,
TIntaPos = 0
)

Open a stream that writes to the dynamic buffer specified in the aBuf argument.

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

See also: TBufBuf::Set RWriteStream::Attach

Parameters
aBufThe dynamic buffer hosting the stream.
aPosThe offset within the dynamic buffer where the stream is to start. Defaults to zero, if not explicitly specified. The value cannot be greater than the current size of the buffer, otherwise a E32USER-CBase 5 panic will be raised when streaming starts.

Truncate ( CBufBase &, TInt )

IMPORT_C voidTruncate(CBufBase &aBuf,
TIntaPos = 0
)

Open a stream that writes into the dynamic buffer specified in the aBuf argument using truncate mode.

See also: TBufBuf::Set TBufBuf::ETruncate RWriteStream::Attach

Parameters
aBufThe dynamic buffer hosting the stream.
aPosThe offset within the dynamic buffer where the stream is to start. Defaults to zero, if not explicitly specified. The value cannot be greater than the current size of the buffer, otherwise a E32USER-CBase 5 panic will be raised when streaming starts.