class Stream

Provides the mechanism for stream objects - it has a number of methods for use

class attributes [NB. Highlighted attributes are static members]
function Stream() - The constructor of the Stream. Must be called when inheriting
function getError() - Get the last error from the stream as a string
function setEndofline() - Set the end of line delimeter for the reading and writing methods
function setAggressive() - Set the stream to be aggressive
function print() - Write a string to the stream
function putc() - Write a character to the stream
function write() - Write a string to the stream
function println() - Write a string to the stream, appending the end of line string afterwards
function writeln() - Write a string to the stream, appending the end of line string afterwards
function printf() - Write a string to the stream, formatted using parameters
function flush() - Force the stream to be flushed
function getc() - Read a character from the stream
function ungetc() - Push a character back onto the internal buffer
function readln() - Read a line from the stream
function read() - Read a number of characters from the stream
function __write__() - Used for implementation of a Stream class
function __read__() - Used for implementation of a Stream class
function __close__() - Used for implementation of a Stream class
function close() - Flush and then close the stream
function eos() - Check to see if the stream is at it's end

Functions

function Stream Click to go up to the list
The constructor of the Stream. Must be called when inheriting
Declaration:
    native function Stream( )

function getError Click to go up to the list
Get the last error from the stream as a string
Declaration:
    native function getError( )
Returns:
    The error message

function setEndofline Click to go up to the list
Set the end of line delimeter for the reading and writing methods
Declaration:
    native function setEndofline( string s )
Parameters:
    Parameter #1: string s - The end of line delimeter to use

function setAggressive Click to go up to the list
Set the stream to be aggressive
Declaration:
    native function setAggressive( )
Description:
Forces the stream to flush at every single read or write operation. Normal operation means that the stream will only flush when necessary.

function print Click to go up to the list
Write a string to the stream
Declaration:
    function print( string s )
Parameters:
    Parameter #1: string s - The string to print

function putc Click to go up to the list
Write a character to the stream
Declaration:
    native function putc( string c )
Parameters:
    Parameter #1: string c - The character to write - the only character will be written is the first one

function write Click to go up to the list
Write a string to the stream
Declaration:
    function write( string s )
Parameters:
    Parameter #1: string s - The string to print

function println Click to go up to the list
Write a string to the stream, appending the end of line string afterwards
Declaration:
    function println( string s )
Parameters:
    Parameter #1: string s - The string to print

function writeln Click to go up to the list
Write a string to the stream, appending the end of line string afterwards
Declaration:
    function writeln( string s )
Parameters:
    Parameter #1: string s - The string to print

function printf Click to go up to the list
Write a string to the stream, formatted using parameters
Declaration:
    native function printf( string fmt, ... )
Description:
This function is analogous to the standard system function printf(). It accepts a format string and some number of variables which correspond to special sequences in the format string. See your system manuals or any good book on C programming for details.
Parameters:
    Parameter #1: string s - The format string
    Parameter #2: void ... - The list of parameters to use

function flush Click to go up to the list
Force the stream to be flushed
Declaration:
    native function flush( )

function getc Click to go up to the list
Read a character from the stream
Declaration:
    function getc( )
Returns:
    A string containing one character from the stream

function ungetc Click to go up to the list
Push a character back onto the internal buffer
Declaration:
    native function ungetc( string c )
Parameters:
    Parameter #1: string c - The character to push onto the buffer
Returns:
    'true' on success, 'false' on fail

function readln Click to go up to the list
Read a line from the stream
Declaration:
    native function readln( )
Description:
The line is read from the stream using the end of line string as a delimeter. The delimeter will be part of the string that is returned.
Returns:
    The data returned

function read Click to go up to the list
Read a number of characters from the stream
Declaration:
    native function read( number c )
Description:
This does not pay attention to line delimeters
Parameters:
    Parameter #1: number c - The number of characters to read
Returns:
    The data that is read

function __write__ Click to go up to the list
Used for implementation of a Stream class
Declaration:
    native function __write__( string s )
Description:
This method must be overidden in the sub-class. It gets called whenever data is written to the stream. It returns the number of bytes written.
Parameters:
    Parameter #1: string s - The data to write to the stream
Returns:
    The amount of data written

function __read__ Click to go up to the list
Used for implementation of a Stream class
Declaration:
    native function __read__( number count )
Description:
This method must be overidden in the sub-class. It gets called whenever data is read from the stream. It returns the data read. It should read up to count bytes.
Parameters:
    Parameter #1: number count - The number of bytes to read
Returns:
    The string read

function __close__ Click to go up to the list
Used for implementation of a Stream class
Declaration:
    function __close__( )
Description:
This method must be overidden in the sub-class. It gets called when the stream is to be closed

function close Click to go up to the list
Flush and then close the stream
Declaration:
    function close( )

function eos Click to go up to the list
Check to see if the stream is at it's end
Declaration:
    native function eos( )
Returns:
    'true' if it's at the end, 'false' otherwise

Automatically generated at 8:45pm, Wednesday 08 January 2003 by feritedoc.