Class Index

Classes


Class PDFNet.FilterReader

PDFNet.FilterReader

Class Summary
Constructor Attributes Constructor Name and Description
 
FilterReader is a utility class providing a convenient way to read data from an input filter (using Filter directly is not very intuitive).
Method Summary
Method Attributes Method Name and Description
 
attachFilter(filter)
Attaches a filter to the this FilterReader.
 
<static>  
PDFNet.FilterReader.create(filter)
Creates a new filter reader object
 
Destructor
 
Forces any data remaining in the buffer to be written to input or output filter.
 
Forces any data remaining in the filter chain to the source or destination.
 
get()
 
 
peek()
 
seek(offset, origin)
Sets the position within the current stream.
 
tell()
Reports the current read position in the stream relative to the stream origin.
Class Detail
PDFNet.FilterReader(id)
FilterReader is a utility class providing a convenient way to read data from an input filter (using Filter directly is not very intuitive). For example:
Parameters:
id
Method Detail
attachFilter(filter)
Attaches a filter to the this FilterReader.
Parameters:
{Filter} filter
filter object to attach

{number} count()
Returns:
{number} A promise that resolves to the number of bytes consumed since opening the filter or since the last Seek operation.

<static> {FilterReader} PDFNet.FilterReader.create(filter)
Creates a new filter reader object
Parameters:
{Filter} filter
(generated documentation)
Returns:
{FilterReader} A promise that resolves to an object of type: "FilterReader" (generated documentation)

destroy()
Destructor

flush()
Forces any data remaining in the buffer to be written to input or output filter.

flushAll()
Forces any data remaining in the filter chain to the source or destination.

{number} get()
Returns:
{number} A promise that resolves to the next character from the stream or EOF (-1) if the end of file is reached.

{Filter} getAttachedFilter()
Returns:
{Filter} A promise that resolves to The attached Filter or a NULL filter if no filter is attached.

{number} peek()
Returns:
{number} A promise that resolves to the next character without extracting it from the stream or or EOF (-1) if the end of file is reached.

seek(offset, origin)
Sets the position within the current stream.
Parameters:
{number} 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.
{number} origin
A value of type ReferencePos indicating the reference point used to obtain the new position

{number} tell()
Reports the current read position in the stream relative to the stream origin.
Returns:
{number} A promise that resolves to The current position in the stream

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Nov 17 2016 16:54:45 GMT-0800 (PST)