InputStream
Object Hierarchy:
Description:
public abstract class InputStream :
Object
InputStream has functions to read from a stream (
read), to close a stream (
close) and to skip some content (
skip).
To copy the content of an input stream to an output stream without manually handling the reads and writes, use
splice.
All of these functions have async variants too.
Content:
Creation methods:
Methods:
- public void clear_pending ()
Clears the pending flag on this.
- public abstract bool close (Cancellable? cancellable = null) throws IOError
Closes the stream, releasing resources related to it.
- public virtual async bool close_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
Requests an asynchronous closes of the stream, releasing resources
related to it.
- public bool has_pending ()
Checks if an input stream has pending actions.
- public bool is_closed ()
Checks if an input stream is closed.
- public abstract ssize_t read (uint8[] buffer, Cancellable? cancellable = null) throws IOError
Tries to read buffer.length
bytes from the stream
into the buffer starting at buffer
.
- public bool read_all (uint8[] buffer, out size_t bytes_read, Cancellable? cancellable = null) throws IOError
Tries to read buffer.length
bytes from the stream
into the buffer starting at buffer
.
- public async bool read_all_async (uint8[] buffer, int io_priority, Cancellable? cancellable, out size_t bytes_read) throws Error
- public virtual async ssize_t read_async (uint8[] buffer, int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
Request an asynchronous read of buffer.length
bytes
from the stream into the buffer starting at buffer
.
- public Bytes read_bytes (size_t count, Cancellable? cancellable = null) throws Error
Like
read, this tries to read count
bytes from the stream in a blocking fashion.
- public async Bytes read_bytes_async (size_t count, int io_priority = DEFAULT, Cancellable? cancellable = null) throws Error
Request an asynchronous read of count
bytes from the
stream into a new Bytes.
- public bool set_pending () throws Error
Sets this to have actions
pending.
- public virtual ssize_t skip (size_t count, Cancellable? cancellable = null) throws IOError
Tries to skip count
bytes from the stream.
- public virtual async ssize_t skip_async (size_t count, int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
Request an asynchronous skip of count
bytes from the
stream.
Inherited Members:
All known members inherited from class GLib.Object