Class IOWindow
In: lib/archive/support/iowindow.rb
Parent: Object

IOWindow represents an IO object which wraps another one allowing read and/or write access to a subset of the data within the stream.

NOTE: This object is NOT thread safe.

Methods

Included Modules

IO::Like

Attributes

window_position  [R]  The file position at which this window begins.
window_size  [R]  The size of the window.

Public Class methods

Creates a new instance of this class using io as the data source and where window_position and window_size define the location and size of data window respectively.

io must be opened for reading and must be seekable. window_position must be an integer greater than or equal to 0. window_size must be an integer greater than or equal to 0.

Public Instance methods

Set the file position at which this window begins. window_position must be an integer greater than or equal to 0.

Set the size of the window. window_size must be an integer greater than or equal to 0.

[Validate]