BufferedInputStream
Object Hierarchy:
Description:
Namespace: GLib
Package: gio-2.0
Content:
Properties:
Creation methods:
Methods:
-
public virtual ssize_t fill (ssize_t count, Cancellable? cancellable = null) throws Error
Tries to read count bytes from the stream into the buffer. Will block during this read.
-
public virtual async ssize_t fill_async (ssize_t count, int io_priority = DEFAULT, Cancellable? cancellable = null) throws Error
Reads data into stream's buffer asynchronously, up to count size.
io_priority can be used to prioritize reads. For the synchronous version of this function, see
fill.
-
public size_t get_available ()
Gets the size of the available data within the stream.
-
public size_t get_buffer_size ()
Gets the size of the input buffer.
-
public size_t peek (uint8[] buffer, size_t offset = 0)
Peeks in the buffer, copying data of size count into buffer, offset
offset bytes.
-
public weak uint8[] peek_buffer ()
Returns the buffer with the currently available bytes. The returned buffer must not be modified and
will become invalid when reading from the stream or filling the buffer.
-
public int read_byte (Cancellable? cancellable = null) throws Error
Tries to read a single byte from the stream or the buffer. Will block during this read.
-
public void set_buffer_size (size_t size)
Sets the size of the internal buffer of stream to size, or to the size of
the contents of the buffer. The buffer can never be resized smaller than its current contents.