iText 7 7.1.8 API
iText.IO.Source.IndependentRandomAccessSource Class Reference

A RandomAccessSource that is wraps another RandomAccessSource but does not propagate close(). More...

Inheritance diagram for iText.IO.Source.IndependentRandomAccessSource:
iText.IO.Source.IRandomAccessSource

Public Member Functions

  IndependentRandomAccessSource (IRandomAccessSource source)
  Constructs a new IndependentRandomAccessSource object More...
 
virtual int  Get (long position)
  Gets a byte at the specified position More...
 
virtual int  Get (long position, byte[] bytes, int off, int len)
  Read an array of bytes of specified length from the specified position of source to the buffer applying the offset. More...
 
virtual long  Length ()
  Gets the length of the source More...
 
virtual void  Close ()
  Does nothing - the underlying source is not closed More...
 

Detailed Description

A RandomAccessSource that is wraps another RandomAccessSource but does not propagate close().

A RandomAccessSource that is wraps another RandomAccessSource but does not propagate close(). This is useful when passing a RandomAccessSource to a method that would normally close the source.

Constructor & Destructor Documentation

◆ IndependentRandomAccessSource()

iText.IO.Source.IndependentRandomAccessSource.IndependentRandomAccessSource ( IRandomAccessSource  source )
inline

Constructs a new IndependentRandomAccessSource object

Parameters
source the source

Member Function Documentation

◆ Close()

virtual void iText.IO.Source.IndependentRandomAccessSource.Close ( )
inlinevirtual

Does nothing - the underlying source is not closed

Exceptions
System.IO.IOException

Implements iText.IO.Source.IRandomAccessSource.

◆ Get() [1/2]

virtual int iText.IO.Source.IndependentRandomAccessSource.Get ( long  position )
inlinevirtual

Gets a byte at the specified position

Exceptions
System.IO.IOException

Implements iText.IO.Source.IRandomAccessSource.

◆ Get() [2/2]

virtual int iText.IO.Source.IndependentRandomAccessSource.Get ( long  position,
byte[]  bytes,
int  off,
int  len 
)
inlinevirtual

Read an array of bytes of specified length from the specified position of source to the buffer applying the offset.

Exceptions
System.IO.IOException

Implements iText.IO.Source.IRandomAccessSource.

◆ Length()

virtual long iText.IO.Source.IndependentRandomAccessSource.Length ( )
inlinevirtual

Gets the length of the source

Implements iText.IO.Source.IRandomAccessSource.