public class FilterReader
extends java.lang.Object
StdFile file=new StdFile("my_stream.txt"), StdFile.e_read_mode );
FilterReader reader=new FilterReader(file);
while (reader.Read(...)) ...
Constructor and Description |
---|
FilterReader()
Instantiates a new filter reader.
|
FilterReader(Filter filter)
Instantiates a new filter reader for the specified Filter
|
Modifier and Type | Method and Description |
---|---|
long |
__GetHandle() |
void |
attachFilter(Filter filter)
Attaches a filter to the this FilterReader.
|
long |
count()
Count number of bytes consume since last seek opertion or opening filter
|
void |
destroy()
Frees the native memory of the object.
|
void |
flush()
Forces any data remaining in the buffer to be written to input or output filter.
|
void |
flushAll()
Forces any data remaining in the filter chain to the source or destination.
|
int |
get()
Get the next character from stream
|
Filter |
getAttachedFilter()
Get the attached filter.
|
int |
peek()
Get the next character without extracting it
|
long |
read(byte[] buf) |
void |
seek(long offset,
int origin)
Set the position within the current stream.
|
long |
tell()
Reports the current read position in the stream relative to the stream origin.
|
public FilterReader() throws PDFNetException
PDFNetException
public FilterReader(Filter filter) throws PDFNetException
filter
- the filterPDFNetException
public void destroy() throws PDFNetException
PDFNetException
public int get() throws PDFNetException
PDFNetException
public int peek() throws PDFNetException
PDFNetException
public long read(byte[] buf) throws PDFNetException
buf
- the buffer to readPDFNetException
public void attachFilter(Filter filter) throws PDFNetException
filter
- the filterPDFNetException
public Filter getAttachedFilter() throws PDFNetException
PDFNetException
public void seek(long offset, int origin) throws PDFNetException
Note: - After each Seek() operation the number of consumed bytes (i.e. Count()) is set to 0.
offset
- - A byte offset relative to origin. If offset is negative,
the new position will precede the position specified by origin by the number
of bytes specified by offset. If offset is zero, the new position will be the
position specified by origin. If offset is positive, the new position will follow
the position specified by origin by the number of bytes specified by offset.origin
- - A value of type ReferencePos indicating the reference point used
to obtain the new positionPDFNetException
public long tell() throws PDFNetException
PDFNetException
public long count() throws PDFNetException
PDFNetException
public void flush() throws PDFNetException
PDFNetException
public void flushAll() throws PDFNetException
PDFNetException
public long __GetHandle()