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 > & anExter Specifies an externalizer.

RBufWriteStream(CBufBase &, TInt)

IMPORT_C RBufWriteStream ( CBufBase & aBuf,
TInt aPos = 0
)

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

RBufWriteStream::Open

Parameters

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

void Append ( CBufBase & aBuf ) [inline]

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

RBufWriteStream::Insert

Parameters

CBufBase & aBuf The dynamic buffer that will be the source of this stream.

Insert(CBufBase &, TInt)

IMPORT_C void Insert ( CBufBase & aBuf,
TInt aPos
)

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 & aBuf The dynamic buffer hosting the stream.
TInt aPos The 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 void Open ( CBufBase & aBuf,
TInt aPos = 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 & aBuf The dynamic buffer hosting the stream.
TInt aPos = 0 The 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 void Truncate ( CBufBase & aBuf,
TInt aPos = 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 & aBuf The dynamic buffer hosting the stream.
TInt aPos = 0 The 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]