Module: BinData::IO::Read::UnSeekableStream
- Defined in:
- lib/bindata/io.rb
Overview
Manually keep track of offset for unseekable streams.
Instance Method Summary collapse
-
#num_bytes_remaining ⇒ Object
The number of bytes remaining in the input stream.
-
#offset ⇒ Object
Returns the current offset of the io stream.
Instance Method Details
#num_bytes_remaining ⇒ Object
The number of bytes remaining in the input stream.
235 236 237 |
# File 'lib/bindata/io.rb', line 235 def num_bytes_remaining raise IOError, "stream is unseekable" end |
#offset ⇒ Object
Returns the current offset of the io stream. The exact value of the offset when reading bitfields is not defined.
230 231 232 |
# File 'lib/bindata/io.rb', line 230 def offset @read_count ||= 0 end |