#import <ObjectiveLib/DataOutStream.h>
Inheritance diagram for OLDataOutStream:
Public Member Functions | |
(const uint8_t *) | - bytes |
Return a pointer to the beginning of the data. | |
(unsigned) | - count |
Return the number of bytes. | |
(void) | - freeStreamResources |
Free the stream's resources. | |
(unsigned) | - writeBytes:count: |
Write a sequence of bytes to the stream. | |
Initializers and Deallocators | |
(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. |
This is a concrete connected stream that writes its data to a memory buffer.
- (const uint8_t*) bytes |
Return a pointer to the beginning of the data.
- (unsigned) count |
Return the number of bytes.
- (void) freeStreamResources |
Free the stream's resources.
This secondary freeing method is necessary to allow the reference count to be properly manipulated from within the normal free (OLReferenceCountedStream) method.
Reimplemented from OLReferenceCountedStream.
- (id) init |
Initialize the stream.
Reimplemented from OLReferenceCountedStream.
+ (id) stream |
Create and return a new 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.
bytes | the bytes to write | |
count | the number of bytes to write |
Reimplemented from OLOutStream.
- (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.
|