Table of Contents

Class WindowRandomAccessSource

Namespace
iText.IO.Source
Assembly
itext.io.dll

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 IRandomAccessSource

the source

offset long

the 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 IRandomAccessSource

the source

offset long

the amount of the offset to use

length long

the 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

int

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

position long
bytes byte[]
off int
len int

Returns

int

Length()

Note that the length will be adjusted to read from the corrected location in the underlying source

public virtual long Length()

Returns

long