Container for stream data that is more complex than a string.
This helper class wraps all information necessary to read stream data by using a Fiber object (see HexaPDF::Filter). The underlying data either comes from an IO object, a file represented by its file name or a Fiber defined via a Proc object.
Additionally, the filter
and decode_parms can
be set to indicate that the data returned from the Fiber needs to be
automatically normalized to arrays on assignment to ease further
The decoding parameters associated with the
The filter(s) that need to be applied for getting the decoded stream data.
Public Class Methods
Creates a new StreamData object for the given
source and with the given options.
source can be:
An IO stream which is read starting from a specific
offsetfor a specific
A string which is interpreted as a file name and read starting from a specific
and for a specific
A Proc object (that is converted to a Fiber when needed) in which case the
offsetand value is ignored. The Proc object can also be passed by using a block.
Public Instance Methods
Returns a Fiber for getting at the data of the stream represented by this object.