-
Notifications
You must be signed in to change notification settings - Fork 1
serializer.buffered stream
load serializer.buffered-stream
This module provides the Serializer.BufferedStream class which is a convenient wrapper to add buffering to a stream object.
This class creates a convenient interface for reading and writing data on a stream object. Data from the underlying object are stored in a buffer to get retrieved later.
| Modifiers | Member | Description |
|---|---|---|
const |
<< | Writes data to the stream, and returns a reference to the stream. |
const |
>> | Reads the remaining data from the stream and stores it in data, then returns ... |
const |
isEmpty | Returns true if the stream has no more data to read; otherwise returns false. |
const |
new | Creates a new stream for reading and writing data using stream. |
const |
read | Reads all remaining data from the stream and returns it as an instance of Ser... |
const |
readSome | Reads at most count bytes of data from the stream and returns it as an instan... |
const |
write | Writes the content of data to the stream. The write method of the underlying ... |
| Modifiers | Member | Description |
|---|---|---|
final |
buffer | Internal read buffer. |
final |
pos | Internal read index. |
final const
|
refill | Refill the internal read buffer with some data from the stream. Returns true ... |
final |
stream | Internal underlying stream. |
def (self, data)
Writes data to the stream, and returns a reference to the stream.
def (self, data)
Reads the remaining data from the stream and stores it in data, then returns a reference to the stream.
null
Internal read buffer.
def (const self)
Returns true if the stream has no more data to read; otherwise returns false.
def (self, stream)
Creates a new stream for reading and writing data using stream.
0
Internal read index.
def (self)
Reads all remaining data from the stream and returns it as an instance of Serializer.DataStream or returns
none if no more byte is available on the stream.
def (self, count)
Reads at most count bytes of data from the stream and returns it as an instance of Serializer.DataStream or
returns none if no more byte is available on the stream.
def (self)
Refill the internal read buffer with some data from the stream. Returns true if the buffer has been refilled;
otherwise returns false.
null
Internal underlying stream.
def (self, data)
Writes the content of data to the stream. The write method of the underlying object is used to write the
data.
- Introduction
- Variables
-
Built-in-types
- Built-in-types#none
- Built-in-types#null
- Built-in-types#boolean
- Built-in-types#number
- Built-in-types#string
- Built-in-types#regex
- Built-in-types#array
- Built-in-types#hash
- Built-in-types#iterator
- Built-in-types#async_iterator
- Built-in-types#package
- Built-in-types#function
- Built-in-types#coroutine
- Built-in-types#library
- Built-in-types#libobject
- Arithmetic-operations
- Type-casting
- Control-structures
- Function-definition
- User-defined-types
- Work-with-modules