class BinData::IO::Read
def read(n = nil)
def read(n = nil) str = @io.read(n) if n raise EOFError, "End of file reached" if str.nil? raise IOError, "data truncated" if str.size < n end str end
def read(n = nil) str = @io.read(n) if n raise EOFError, "End of file reached" if str.nil? raise IOError, "data truncated" if str.size < n end str end