Skip to main content

InputStream

An input data stream

warning

This page is a WIP. It contains all the information in Figura's documentation but we're working on adding more helpful descriptions.


available()​

Returns amount of bytes available

available()

Returns:

TypeDescription
Integer-

Example:

-- example coming soon

close()​

Closes this input stream

close()

Returns:

TypeDescription
nil-

Example:

-- example coming soon

isAsyncOnly()​

Is this stream async-only or not

isAsyncOnly()

Returns:

TypeDescription
Boolean-

Example:

-- example coming soon

mark()​

Marks current position in input stream

mark(readLimit)

Parameters:

NameTypeDescriptionDefault
readLimitInteger--

Returns:

TypeDescription
nil-

Example:

-- example coming soon

markSupported()​

Does this input stream supports marking or not

markSupported()

Returns:

TypeDescription
Boolean-

Example:

-- example coming soon

read()​

Reads one byte from this stream. Might throw an error if stream is async-only

read()

Returns:

TypeDescription
Integer-

Example:

-- example coming soon

readAsync()​

Starts reading specified amount of bytes from this stream and returns future that will contain byte array of stream bytes once done

readAsync()

Returns:

TypeDescription
Future-

Example:

-- example coming soon

reset()​

Resets input stream position to mark

reset()

Returns:

TypeDescription
nil-

Example:

-- example coming soon

skip()​

Skips specified amount of bytes in stream. Returns the actual amount of bytes skipped

skip(n)

Parameters:

NameTypeDescriptionDefault
nInteger--

Returns:

TypeDescription
Integer-

Example:

-- example coming soon

transferTo()​

Transfers left data in this input stream to provided output stream

transferTo(out)

Parameters:

NameTypeDescriptionDefault
outOutputStream--

Returns:

TypeDescription
Integer-

Example:

-- example coming soon