OutputStream Class extending Object

/ The OutputStream is a pure class that represents an output stream. This class provides functionality to write, get, empty and print to a output stream You must extend this class if you are creating your own implementation of OutputStream. All output streams extend this class /

Class Methods

Writes one byte to the output stream buffer

function write(number n) : void


Flushes this output stream writing all data from the output stream buffer to the service this output stream is for.
This is a pure method and must be implemented by output streams

function flush() : void

Gets the byte at the given index in the output stream buffe

function get(number index) : number


Clears the OutputStreams output stream buffer essentially making it as if no writes have happend before the last flush

function empty() : void

Returns the size of the OutputStream's output stream buffer since the last flush

function size() : number


Writes the given string to the OutputStream's output stream buffer

function print(string message) : void