public class

FileDescriptorFilter

extends CustomFilter
java.lang.Object
   ↳ com.pdftron.filters.Filter
     ↳ com.pdftron.filters.CustomFilter
       ↳ com.pdftron.filters.FileDescriptorFilter

This class is deprecated.
Use SecondaryFileFilter instead.

Summary

Constants
String TAG
[Expand]
Inherited Constants
From class com.pdftron.filters.CustomFilter
Public Constructors
FileDescriptorFilter(int mode, ParcelFileDescriptor pfd)
FileDescriptorFilter(int mode, FileDescriptorFilter fileDescriptorFilter)
Public Methods
static FileDescriptorFilter __Create(long impl, FileDescriptorFilter prev)
boolean canWriteOnInputFilter()
void close()
FileDescriptorFilter createOutputIterator()
void destroy()
Frees the native memory of the object.
int getThreadId()
long onCreateInputIterator(Object o)
void onDestroy(Object o)
long onFlush(Object o)
The abstract function in which the output data is flushed.
long onRead(byte[] bytes, Object o)
The abstract function in which the input data are read.
long onSeek(long offset, int origin, Object o)
The abstract function in which the position indicator of the filter is set.
long onTell(Object o)
The abstract function in which the position indicator of the filter is queried.
long onTruncate(long new_size, Object o)
The abstract function the size of the filter is set
long onWrite(byte[] bytes, Object o)
The abstract function in which the data are output.
boolean switchToWriteMode()
[Expand]
Inherited Methods
From class com.pdftron.filters.CustomFilter
From class com.pdftron.filters.Filter
From class java.lang.Object

Constants

public static final String TAG

Constant Value: "SaveFilter"

Public Constructors

public FileDescriptorFilter (int mode, ParcelFileDescriptor pfd)

public FileDescriptorFilter (int mode, FileDescriptorFilter fileDescriptorFilter)

Public Methods

public static FileDescriptorFilter __Create (long impl, FileDescriptorFilter prev)

public boolean canWriteOnInputFilter ()

public void close ()

public FileDescriptorFilter createOutputIterator ()

public void destroy ()

Frees the native memory of the object. This can be explicitly called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public int getThreadId ()

public long onCreateInputIterator (Object o)

public void onDestroy (Object o)

public long onFlush (Object o)

The abstract function in which the output data is flushed.

Parameters
o The user data from passed in via #CustomFilter(int, Object).
Returns
  • If successful, the value is 0; otherwise, it is non-zero.

public long onRead (byte[] bytes, Object o)

The abstract function in which the input data are read.

Parameters
bytes The buffer to contain the data to read, which has already been allocated.
o The user data from passed in via #CustomFilter(int, Object).
Returns
  • The number of bytes read. It should return 0 if it fails or reaches the end of the input stream.

public long onSeek (long offset, int origin, Object o)

The abstract function in which the position indicator of the filter is set.

Parameters
offset Number of bytes to offset from origin. A positive value implies the indicator is moved forward, and a negative value implies the indicator is moved backward.
origin Position from where offset is added. It is specified by one of the following: SEEK_SET, SEEK_CUR, SEEK_END.
o The user data from passed in via #CustomFilter(int, Object).
Returns
  • The new position of the indicator set. If successful, the value is 0; otherwise, it is non-zero.

public long onTell (Object o)

The abstract function in which the position indicator of the filter is queried.

Parameters
o The user data from passed in via #CustomFilter(int, Object).
Returns
  • The position of the indicator.

public long onTruncate (long new_size, Object o)

The abstract function the size of the filter is set

Parameters
new_size number of bytes to resize the filter to.
o The user data from passed in via #CustomFilter(int, Object).
Returns
  • The new size of the filter.

public long onWrite (byte[] bytes, Object o)

The abstract function in which the data are output.

Parameters
bytes The buffer to contain the data to write out.
o The user data from passed in via #CustomFilter(int, Object).
Returns
  • The number of bytes successfully written.

public boolean switchToWriteMode ()