ObjectiveLib  1.0.0
Public Member Functions | Static Public Member Functions | Protected Attributes
OLDataOutStream Class Reference

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
(id) - init
 Initialize the stream.
(void) - dealloc

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:
bytesthe bytes to write
countthe 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 Sat Feb 15 2014 07:45:34, © 2004-2007 Will Mason