fm.liveswitch.ByteOutputStream Class Reference

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

Public Member Functions

 ByteOutputStream ()
 
int getSize ()
 Gets the number of bytes written to the stream. More...
 
void reset ()
 Empties this stream and resets it. More...
 
byte[] toArray ()
 Converts the stream to a byte array. More...
 
void write (byte value)
 Writes a value to the stream. More...
 
void writeBuffer (byte[] buffer)
 Writes a buffer to the stream. More...
 
void writeBuffer (byte[] buffer, int offset, int length)
 Writes a buffer to the stream. More...
 
void writeTo (fm.liveswitch.ByteOutputStream stream)
 Writes the contents of this stream to another stream. More...
 

Detailed Description

An buffer of bytes that can be written sequentially.

Constructor & Destructor Documentation

◆ ByteOutputStream()

fm.liveswitch.ByteOutputStream.ByteOutputStream ( )

Member Function Documentation

◆ getSize()

int fm.liveswitch.ByteOutputStream.getSize ( )

Gets the number of bytes written to the stream.

◆ reset()

void fm.liveswitch.ByteOutputStream.reset ( )

Empties this stream and resets it.

◆ toArray()

byte [] fm.liveswitch.ByteOutputStream.toArray ( )

Converts the stream to a byte array.

◆ write()

void fm.liveswitch.ByteOutputStream.write ( byte  value)

Writes a value to the stream.

Parameters
valueThe value.

◆ writeBuffer() [1/2]

void fm.liveswitch.ByteOutputStream.writeBuffer ( byte[]  buffer)

Writes a buffer to the stream.

Parameters
bufferThe buffer.

◆ writeBuffer() [2/2]

void fm.liveswitch.ByteOutputStream.writeBuffer ( byte[]  buffer,
int  offset,
int  length 
)

Writes a buffer to the stream.

Parameters
bufferThe buffer.
offsetThe offset.
lengthThe length.

◆ writeTo()

void fm.liveswitch.ByteOutputStream.writeTo ( fm.liveswitch.ByteOutputStream  stream)

Writes the contents of this stream to another stream.

Parameters
streamThe stream.