lib/bindata/io.rb
# The number of bytes remaining in the input stream.
The number of bytes remaining in the input stream.
The number of bytes remaining in the input stream .
def num_bytes_remaining
      if positioning_supported?
        pos = @raw_io.pos
        @raw_io.seek(0, ::IO::SEEK_END)
        bytes_remaining = @raw_io.pos - pos
        @raw_io.seek(pos, ::IO::SEEK_SET)
        bytes_remaining
      else
        0
      end
    end
def num_bytes_remaining if positioning_supported? pos = @raw_io . pos @raw_io . seek ( 0 , :: IO :: SEEK_END ) bytes_remaining = @raw_io . pos - pos @raw_io . seek ( pos , :: IO :: SEEK_SET ) bytes_remaining else 0 end end
The number of bytes remaining in the input stream.
The number of bytes remaining in the input stream .