FMLiveSwitchByteOutputStream Class Reference

An buffer of bytes that can be written sequentially. More...

Instance Methods

(instancetype) - init
 
(void) - reset
 Empties this stream and resets it. More...
 
(int) - size
 Gets the number of bytes written to the stream. More...
 
(NSMutableData *) - toArray
 Converts the stream to a byte array. More...
 
(void) - write:
 Writes a value to the stream. More...
 
(void) - writeBuffer:
 Writes a buffer to the stream. More...
 
(void) - writeBuffer:offset:length:
 Writes a buffer to the stream. More...
 
(void) - writeToWithStream:
 Writes the contents of this stream to another stream. More...
 

Class Methods

(FMLiveSwitchByteOutputStream *) + byteOutputStream
 

Detailed Description

An buffer of bytes that can be written sequentially.

Method Documentation

◆ byteOutputStream

+ (FMLiveSwitchByteOutputStream*) byteOutputStream

◆ init

- (instancetype) init

◆ reset

- (void) reset

Empties this stream and resets it.

◆ size

- (int) size

Gets the number of bytes written to the stream.

◆ toArray

- (NSMutableData*) toArray

Converts the stream to a byte array.

◆ write:

- (void) write: (uint8_t)  value

Writes a value to the stream.

Parameters
valueThe value.

◆ writeBuffer:

- (void) writeBuffer: (NSMutableData *)  buffer

Writes a buffer to the stream.

Parameters
bufferThe buffer.

◆ writeBuffer:offset:length:

- (void) writeBuffer: (NSMutableData *)  buffer
offset: (int)  offset
length: (int)  length 

Writes a buffer to the stream.

Parameters
bufferThe buffer.
offsetThe offset.
lengthThe length.

◆ writeToWithStream:

- (void) writeToWithStream: (FMLiveSwitchByteOutputStream *)  stream

Writes the contents of this stream to another stream.

Parameters
streamThe stream.