Class WindowRandomAccessSource
A RandomAccessSource that wraps another RandomAccessSource and provides a window of it at a specific offset and over a specific length.
public class WindowRandomAccessSource : IRandomAccessSource
- Inheritance
-
WindowRandomAccessSource
- Implements
- Inherited Members
Remarks
A RandomAccessSource that wraps another RandomAccessSource and provides a window of it at a specific offset and over a specific length. Position 0 becomes the offset position in the underlying source.
Constructors
WindowRandomAccessSource(IRandomAccessSource, long)
Constructs a new OffsetRandomAccessSource that extends to the end of the underlying source
public WindowRandomAccessSource(IRandomAccessSource source, long offset)
Parameters
source
IRandomAccessSourcethe source
offset
longthe amount of the offset to use
WindowRandomAccessSource(IRandomAccessSource, long, long)
Constructs a new OffsetRandomAccessSource with an explicit length
public WindowRandomAccessSource(IRandomAccessSource source, long offset, long length)
Parameters
source
IRandomAccessSourcethe source
offset
longthe amount of the offset to use
length
longthe number of bytes to be included in this RAS
Methods
Close()
public virtual void Close()
Get(long)
Note that the position will be adjusted to read from the corrected location in the underlying source
public virtual int Get(long position)
Parameters
position
long
Returns
Get(long, byte[], int, int)
Note that the position will be adjusted to read from the corrected location in the underlying source
public virtual int Get(long position, byte[] bytes, int off, int len)
Parameters
Returns
Length()
Note that the length will be adjusted to read from the corrected location in the underlying source
public virtual long Length()