RBufWriteStream Class Reference

class RBufWriteStream : public RWriteStream

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.

TBufBuf RWriteStream

Inherits from

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

MExternalizer CStoreMap

Parameters

const MExternalizer< TStreamRef > & 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.

RBufWriteStream::Open

Parameters

CBufBase & aBufThe dynamic buffer hosting the stream.
TInt aPos = 0The 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 Functions Documentation

Append(CBufBase &)

voidAppend(CBufBase &aBuf)[inline]

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

RBufWriteStream::Insert

Parameters

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

TBufBuf::Set TBufBuf::EInsert RWriteStream::Attach

Parameters

CBufBase & aBufThe dynamic buffer hosting the stream.
TInt 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()

TBufBuf::Set RWriteStream::Attach

Parameters

CBufBase & aBufThe dynamic buffer hosting the stream.
TInt aPos = 0The 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.

TBufBuf::Set TBufBuf::ETruncate RWriteStream::Attach

Parameters

CBufBase & aBufThe dynamic buffer hosting the stream.
TInt aPos = 0The 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 Data Documentation

TBufBuf iSink

TBufBuf iSink[private]