Skip to content

__Stream__

Hyomoto edited this page Jun 24, 2021 · 1 revision
Jump To Go Back Arguments Methods Variables

Stream( type )

Implements: Struct

The stream type incorporates both InputStream and OutputStream to allow reading and writing to the same source, while maintaining compatibility with functions that require a stream. However, stream does not have the Stream type! This type is used to indicate data types that can utilize Stream.

Arguments

Name Type Purpose
type [__Stream__](__stream__) A struct that can utilize the stream class

Methods

Jump To top read write open close finished buffer is_open

read( )

Name Type Purpose
None

Reads the next chunk of data from the stream


write( )

Name Type Purpose
None

Writes a chunk of data to the stream


open( s )

Returns: self

Throws: IllegalStreamOperation

Name Type Purpose
s undef No description

Opens the stream. This should facilitate re-opening a closed source if no arguments are provided.


close( )

Returns: self

Throws: IllegalStreamOperation

Name Type Purpose
None

Closes the stream


finished( )

Name Type Purpose
None

Returns true if the stream has nothing left to read


buffer( )

Name Type Purpose
None

Returns the last value read/written to this stream


is_open( )

Returns: bool

Name Type Purpose
None

Returns true if the stream is currently open and available for reading.


Variables

Jump To top
Name Type Initial Purpose
__Id int _type == undefined ? undefined : _type The stream source that has been opened for reading
__Source string _type == undefined ? "" : instanceof( _type ) A name that can be used to identify the stream source
__Buffer string undefined The last thing read from\written to the stream
Clone this wiki locally