OLDataOutStream Class Reference
[Streams]

An out stream connected to a memory buffer. More...

#import <ObjectiveLib/DataOutStream.h>

Inheritance diagram for OLDataOutStream:

Inheritance graph
[legend]
List of all members.

Public Member Functions

(const uint8_t *) - bytes
 Return a pointer to the beginning of the data.
(unsigned) - count
 Return the number of bytes.
(NSData *) - data
 Return the data object.
(unsigned) - writeBytes:count:
 Write a sequence of bytes to the stream.
Initializers and Deallocators
(void) - dealloc
(id) - init
 Initialize the stream.

Static Public Member Functions

(id) + stream
 Create and return a new stream.

Protected Attributes

uint8_t * buffer
 The buffer to which to write data.
uint8_t * end
 The end of the data.
uint8_t * insert
 The position at which to insert data.

Detailed Description

An out stream connected to a memory buffer.

This is a concrete connected stream that writes its data to a memory buffer.

See also:
OLDataInStream


Member Function Documentation

- (const uint8_t*) bytes  

Return a pointer to the beginning of the data.

Returns:
the data pointer

- (unsigned) count  

Return the number of bytes.

Returns:
the number of bytes

- (NSData*) data  

Return the data object.

This object contains all the bytes that have up the current moment been written to the stream.

Returns:
the data object containing the stream's memory buffer

- (id) init  

Initialize the stream.

Returns:
a reference to this stream

+ (id) stream  

Create and return a new stream.

Note:
If OpenStep is present the returned object will be autoreleased before being returned.
Returns:
a reference to the newly created stream

- (unsigned) writeBytes: (const uint8_t *)  bytes
count: (unsigned)  count 

Write a sequence of bytes to the stream.

Bytes are copied into the memory buffer which grows as needed.

Parameters:
bytes the bytes to write
count the number of bytes to write
Returns:
the number of bytes written

Reimplemented from OLOutStream.


Member Data Documentation

- (uint8_t*) buffer [protected]

The buffer to which to write data.

- (uint8_t*) end [protected]

The end of the data.

- (uint8_t*) insert [protected]

The position at which to insert data.


The documentation for this class was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:13:06 2007, © 2004-2007 Will Mason
SourceForge.net Logo