InputStream
An input data stream
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:
Type | Description |
---|---|
Integer | - |
Example:
-- example coming soon
close()
Closes this input stream
close()
Returns:
Type | Description |
---|---|
nil | - |
Example:
-- example coming soon
isAsyncOnly()
Is this stream async-only or not
isAsyncOnly()
Returns:
Type | Description |
---|---|
Boolean | - |
Example:
-- example coming soon
mark()
Marks current position in input stream
mark(readLimit)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
readLimit | Integer | - | - |
Returns:
Type | Description |
---|---|
nil | - |
Example:
-- example coming soon
markSupported()
Does this input stream supports marking or not
markSupported()
Returns:
Type | Description |
---|---|
Boolean | - |
Example:
-- example coming soon
read()
Reads one byte from this stream. Might throw an error if stream is async-only
read()
Returns:
Type | Description |
---|---|
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:
Type | Description |
---|---|
Future | - |
Example:
-- example coming soon
reset()
Resets input stream position to mark
reset()
Returns:
Type | Description |
---|---|
nil | - |
Example:
-- example coming soon
skip()
Skips specified amount of bytes in stream. Returns the actual amount of bytes skipped
skip(n)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n | Integer | - | - |
Returns:
Type | Description |
---|---|
Integer | - |
Example:
-- example coming soon
transferTo()
Transfers left data in this input stream to provided output stream
transferTo(out)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
out | OutputStream | - | - |
Returns:
Type | Description |
---|---|
Integer | - |
Example:
-- example coming soon