Class TapeArchive::Entry::InputStream
In: tar.rb
Parent: ::InputStream

This is the class returned by Entry when an input stream is requested. It basically maps a subset of a stream and treats it as its own stream.

Methods
close    closed?    eof?    new    pos    pos=    read    rewind   
Public Class methods
new( file, start, length )

Instantiate a new Entry::InputStream from the given stream, using the given start position and length to define the portion of the stream that this one maps.

Public Instance methods
read( num=nil )

Read num bytes from the stream. If num is nil, read to the end of the stream.

pos()

Return the position of the stream.

pos=( num )

Set the position of the stream.

close()

Attempt to close the stream. This will throw an exception, since Entry::InputStream’s should never be closed directly. Instead, close the stream that this maps to.

closed?()

Query whether the input stream is closed.

rewind()

Rewind the stream to the start of the entry.

eof?()

Query whether the end of the entry has been reached.