Buffered input stream implements FilterInputStream and provides for
buffered reads.
By default, `GBufferedInputStream`'s buffer size is set at 4 kilobytes.
To create a buffered input stream, use [ctor@Gio.BufferedInputStream.new], or [ctor@Gio.BufferedInputStream.new_sized] to specify the
buffer's size at construction.
To get the size of a buffer within a buffered input stream, use [method@Gio.BufferedInputStream.get_buffer_size]. To change the size of a
buffered input stream's buffer, use [method@Gio.BufferedInputStream.set_buffer_size]. Note that the buffer's size cannot be reduced below
the size of the data within the buffer.
Example:Buffered input-streams:
publicstaticint main (string[] args) { if (args.length < 2) { print ("Usage: %s FILE\n", args[0]); return0; }
File infile = File.new_for_commandline_arg (args[1]); if (!infile.query_exists ()) { stderr.printf ("File '%s' does not exist.\n", args[1]); return1; }
try { FileInputStream @is = infile.read (); BufferedInputStream bis = new BufferedInputStream (@is);
StringBuilder builder = new StringBuilder (); uint8 buffer[100]; ssize_t size;