class BinData::IO::Read
def readbytes(n)
If the data read is nil an EOFError is raised.
Reads exactly +n+ bytes from +io+.
def readbytes(n) reset_read_bits str = read(n) raise EOFError, "End of file reached" if str.nil? raise IOError, "data truncated" if str.size < n str end