up: IO     index Zimbu documentation

CLASS IO.ByteReaderStack @public

summary

     

A wrapper around a ByteReader that supports push().

 
Implements IO.I_ByteReader
 
IO.I_ByteReader  $reader @file 
list<int>  $stack @file 
 
NEW(reader) @public  Creates a ByteReader that reads from reader.
$readByte() int @public  Reads and returns one byte.
$push(c) @public  Push c back, a following readByte() will use it.
 

members (alphabetically)

     

IO.I_ByteReader $reader @file

list<int> $stack @file

PROC NEW(IO.I_ByteReader reader) @public

     

Creates a ByteReader that reads from reader.

PROC $push(int c) @public

     

Push c back, a following readByte() will use it.

Can be used any number of times.

FUNC $readByte() int @public

     

Reads and returns one byte.

Uses a pushed back byte when available. When at the end of the string returns IO.eof.

license

      Copyright 2009 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0