Struct BufReader

pub struct BufReader {
    /// The buffer of bytes to read
    buf: ~[u8],
    /// The current position in the buffer of bytes
    pos: @mut uint,
}

An implementation of the io::Reader interface which reads a buffer of bytes

Implementation for BufReader

Method new

fn new(v: ~[u8]) -> BufReader

Creates a new buffer reader for the specified buffer

Implementation of Reader for BufReader

Method read

fn read(&self, bytes: &mut [u8], len: uint) -> uint

Method read_byte

fn read_byte(&self) -> int

Method eof

fn eof(&self) -> bool

Method seek

fn seek(&self, offset: int, whence: io::SeekStyle)

Method tell

fn tell(&self) -> uint