Class FilterReader
FilterReader is a utility class providing a convenient way to read data from an input filter (using Filter directly is not very intuitive).
Inheritance
Implements
Inherited Members
Namespace: pdftron.Filters
Assembly: PDFNetAndroid.dll
Syntax
public class FilterReader : IDisposable
Examples
MappedFile file=new MappedFile("my_stream.txt"));
FilterReader reader=new FilterReader(file);
while (reader.Read(...)) ...
Constructors
FilterReader()
Instantiates a new filter reader.
Declaration
public FilterReader()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
FilterReader(Filter)
Instantiates a new filter reader.
Declaration
public FilterReader(Filter input_filter)
Parameters
Type | Name | Description |
---|---|---|
Filter | input_filter | input filter |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Methods
AttachFilter(Filter)
Attaches a filter to the this FilterReader.
Declaration
public void AttachFilter(Filter filter)
Parameters
Type | Name | Description |
---|---|---|
Filter | filter | the filter to attach |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Count()
Count.
Declaration
public int Count()
Returns
Type | Description |
---|---|
System.Int32 |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Destroy()
Declaration
public void Destroy()
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Finalize()
Releases all resources used by the FilterReader
Declaration
protected void Finalize()
Flush()
Forces any data remaining in the buffer to be written to input or output filter.
Declaration
public void Flush()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
FlushAll()
Forces any data remaining in the filter chain to the source or destination.
Declaration
public void FlushAll()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Get()
Gets the next character
Declaration
public int Get()
Returns
Type | Description |
---|---|
System.Int32 |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
GetAttachedFilter()
Gets the attached filter.
Declaration
public Filter GetAttachedFilter()
Returns
Type | Description |
---|---|
Filter |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Peek()
Peek.
Declaration
public int Peek()
Returns
Type | Description |
---|---|
System.Int32 |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Read(Byte[])
Read.
Declaration
public int Read(byte[] buf)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buf | the buf_size |
Returns
Type | Description |
---|---|
System.Int32 |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Seek(Int32, Filter.ReferencePos)
Sets the position within the current stream.
Declaration
public void Seek(int offset, Filter.ReferencePos origin)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | offset |
|
Filter.ReferencePos | origin |
|
Remarks
- After each Seek() operation the number of consumed bytes (i.e. Count()) is set to 0.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Tell()
Reports the current read position in the stream relative to the stream origin.
Declaration
public int Tell()
Returns
Type | Description |
---|---|
System.Int32 |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |