Method: BinData::IO::Read#readbytes

Defined in:
lib/bindata/io.rb

#readbytes(n) ⇒ Object

Reads exactly n bytes from io.

If the data read is nil an EOFError is raised.

If the data read is too short an IOError is raised.



89
90
91
92
# File 'lib/bindata/io.rb', line 89

def readbytes(n)
  reset_read_bits
  read(n)
end