peek


Description:

[ Version ( since = "0.12.0" ) ]
public Bytes peek (int64 n_bytes) throws Error

Parameters:

this

A SeekableInputStream.

n_bytes

The number of bytes to be peeked.

Returns:

The data of the buffer, up to the indicated number. The data becomes invalid after any operation on the stream. If the stream is unbuffered, the data is empty.

It should be freed with g_bytes_unref when no longer needed.