Public Member Functions | |
FileReaderCallback | exportData (boolean is_raw_data) throws com.foxit.sdk.PDFException |
Export stream data. More... | |
boolean | getData (boolean is_raw_data, long size, byte[] out_buffer) throws com.foxit.sdk.PDFException |
Get stream data. More... | |
int | getDataSize (boolean is_raw_data) throws com.foxit.sdk.PDFException |
Get the size of stream data, in bytes. More... | |
PDFDictionary | getDictionary () throws com.foxit.sdk.PDFException |
Get the PDF dictionary object associated to current PDF stream object. More... | |
int | getStreamFilter () throws com.foxit.sdk.PDFException |
Get the type of stream filter which indicate how the stream data must be decoded before the data is used. More... | |
void | importData (FileReaderCallback file_read, int stream_filter) throws com.foxit.sdk.PDFException |
Import stream data. More... | |
void | setData (byte[] buffer) throws com.foxit.sdk.PDFException |
Set stream data. More... | |
![]() | |
PDFObject | cloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
PDFArray | getArray () |
Get the PDF array object of current PDF object. More... | |
boolean | getBoolean () throws com.foxit.sdk.PDFException |
Get the boolean value of current PDF object. More... | |
DateTime | getDateTime () throws com.foxit.sdk.PDFException |
Get the date time value of current PDF object. More... | |
PDFDictionary | getDict () |
Get the PDF dictionary object of current PDF object. More... | |
PDFObject | getDirectObject () |
Get the direct object of current PDF object. More... | |
float | getFloat () throws com.foxit.sdk.PDFException |
Get the float value of current PDF object. More... | |
int | getInteger () throws com.foxit.sdk.PDFException |
Get the integer value of current PDF object. More... | |
Matrix2D | getMatrix () throws com.foxit.sdk.PDFException |
Get the matrix value of current PDF object. More... | |
String | getName () throws com.foxit.sdk.PDFException |
Get the name value of current PDF object. More... | |
int | getObjNum () |
Get the indirect object number of current PDF object. More... | |
RectF | getRect () throws com.foxit.sdk.PDFException |
Get the rectangle value of current PDF object. More... | |
PDFStream | getStream () |
Get the PDF stream object of current PDF object. More... | |
String | getString () |
Get the string value of current PDF object. More... | |
int | getType () |
Get the type of current PDF object. More... | |
String | getWideString () |
Get the wide string value of current PDF object. More... | |
void | release () |
Release a newly created PDF object or a clone PDF object, which is not related to PDF document or other PDF object and will not be used any more. More... | |
Static Public Member Functions | |
static PDFStream | create (PDFDictionary dictionary) throws com.foxit.sdk.PDFException |
Create a new stream object based on a dictionary. More... | |
![]() | |
static PDFObject | createFromBoolean (boolean boolean_value) |
Create a PDF object from a boolean value. More... | |
static PDFObject | createFromDateTime (DateTime date_time) |
Create a PDF object from date time. More... | |
static PDFObject | createFromFloat (float float_value) |
Create a PDF object from a float number. More... | |
static PDFObject | createFromInteger (int integer_value) |
Create a PDF object from a integer number. More... | |
static PDFObject | createFromName (String name) |
Create a PDF object from a string which represents a name. More... | |
static PDFObject | createFromString (String string_value) |
Create a PDF object from string. More... | |
static PDFObject | createReference (PDFDoc document, int object_number) |
Create a reference for an indirect object. More... | |
Static Public Attributes | |
static final int | e_ASCII85Decode = 2 |
Filter type: ASCII85Decode, which means to decode data encoded in an ASCII base-85 representation, reproducing the original binary data. | |
static final int | e_ASCIIHexDecode = 1 |
Filter type: ASCIIHexDecode, which means to decode data encoded in an ASCII hexadecimal representation, reproducing the original binary data. | |
static final int | e_CCITTFaxDecode = 6 |
Filter type: CCITTFaxDecode, which means to decompress data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel). | |
static final int | e_Crypt = 10 |
Filter type: Crypt, which means to decrypt data encrypted by a security handler, reproducing the original data as it was before encryption. | |
static final int | e_DCTDecode = 8 |
Filter type: DCTDecode, which means to decompress data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data. | |
static final int | e_FlateDecode = 4 |
Filter type: FlateDecode, which means to decompress data encoded using the zlib/deflate compression method, reproducing the original text or binary data. | |
static final int | e_JBIG2Decode = 7 |
Filter type: JBIG2Decode, which means to decompress data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data). | |
static final int | e_JPXDecode = 9 |
Filter type: JPXDecode, which means to decompress data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data. | |
static final int | e_LZWDecode = 3 |
Filter type: LZWDecode, which means to decompress data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data. | |
static final int | e_NoneDecode = 0 |
No need to decode the stream data. | |
static final int | e_RunLengthDecode = 5 |
Filter type: RunLengthDecode, which means to decompress data encoded using a byte-oriented run-length encoding algorithm, reproducing the original text or binary data (typically monochrome image data, or any data that contains frequent long runs of a single byte value). | |
static final int | e_Unknown = -1 |
Unknown filter type. | |
![]() | |
static final int | e_Array = 5 |
PDF array object. | |
static final int | e_Boolean = 1 |
PDF boolean object. | |
static final int | e_Dictionary = 6 |
PDF dictionary object. | |
static final int | e_InvalidType = 0 |
Invalid PDF object type. | |
static final int | e_Name = 4 |
PDF name object. | |
static final int | e_Null = 8 |
PDF null object. | |
static final int | e_Number = 2 |
PDF number object. | |
static final int | e_Reference = 9 |
PDF reference object. | |
static final int | e_Stream = 7 |
PDF stream object. | |
static final int | e_String = 3 |
PDF string object. | |
A PDF stream object consists of a direct dictionary object and stream data. For more details, please refer to Section 3.2.7 "Stream Objects" in <PDF Reference 1.7>.
Class com.foxit.sdk.pdf.objects.PDFStream is derived from PDFObject and offers functions to create a new PDF stream object and get/set stream data.
|
static |
Create a new stream object based on a dictionary.
[in] | dictionary | A PDF dictionary object:
|
FileReaderCallback com.foxit.sdk.pdf.objects.PDFStream.exportData | ( | boolean | is_raw_data | ) | throws com.foxit.sdk.PDFException |
Export stream data.
This function provides an efficient way to get the stream data, especially for large stream data.
[in] | is_raw_data | A boolean value that indicates whether to get raw data or not: true means to get raw data, and false means to get decoded data (original data). |
boolean com.foxit.sdk.pdf.objects.PDFStream.getData | ( | boolean | is_raw_data, |
long | size, | ||
byte [] | out_buffer | ||
) | throws com.foxit.sdk.PDFException |
Get stream data.
When calling this function, user should pass a memory block with enough size to retrieve data. User is recommended to call function PDFStream.getDataSize (with same parameter is_raw_data) to get the expected size, then prepare the memory block, and then call this function to get data.
[in] | is_raw_data | A boolean value that indicates whether to get raw data or not: true means to get raw data, and false means to get decoded data (original data). |
[in] | size | Size of parameter out_buffer, in bytes. It should be equal to or larger than the actual data size. |
[out] | out_buffer | A memory block (with enough size) used as output parameter that receives the stream data. It should not be NULL. |
int com.foxit.sdk.pdf.objects.PDFStream.getDataSize | ( | boolean | is_raw_data | ) | throws com.foxit.sdk.PDFException |
Get the size of stream data, in bytes.
[in] | is_raw_data | A boolean value that indicates whether to get raw data or not: true means to get raw data, and false means to get decoded data (original data). |
PDFDictionary com.foxit.sdk.pdf.objects.PDFStream.getDictionary | ( | ) | throws com.foxit.sdk.PDFException |
Get the PDF dictionary object associated to current PDF stream object.
int com.foxit.sdk.pdf.objects.PDFStream.getStreamFilter | ( | ) | throws com.foxit.sdk.PDFException |
Get the type of stream filter which indicate how the stream data must be decoded before the data is used.
void com.foxit.sdk.pdf.objects.PDFStream.importData | ( | FileReaderCallback | file_read, |
int | stream_filter | ||
) | throws com.foxit.sdk.PDFException |
Import stream data.
[in] | file_read | A common::file::ReaderCallback object implemented by user. Foxit PDF SDK will use this to read stream data and set to current PDF stream object. User should keep this callback valid until the related PDF document is closed or current stream object is released because of useless. |
[in] | stream_filter | Type of stream filter, which specifies how to decode the data which is read through parameter file_read. Please refer to values starting from com.foxit.sdk.pdf.objects.PDFStream.e_NoneDecode and this should be one of these values except com.foxit.sdk.pdf.objects.PDFStream.e_Unknown . |
void com.foxit.sdk.pdf.objects.PDFStream.setData | ( | byte [] | buffer | ) | throws com.foxit.sdk.PDFException |
Set stream data.
[in] | buffer | A memory block that represents the new stream data to be set. |