Method: BinData::IO::Read#with_buffer

Defined in:
lib/bindata/io.rb

#with_buffer(n) ⇒ Object

Sets a buffer of n bytes on the io stream. Any reading or seeking calls inside the block will be contained within this buffer.



252
253
254
255
256
257
# File 'lib/bindata/io.rb', line 252

def with_buffer(n)
  with_buffer_common(n) do
    yield
    read
  end
end