Foxit PDF SDK
com.foxit.sdk.common.Codec Class Reference
Inheritance diagram for com.foxit.sdk.common.Codec:
com.foxit.sdk.common.Base

Public Member Functions

synchronized void delete ()
 Clean up related resources immediately. More...
 

Static Public Member Functions

static byte[] base64Decode (byte[] encoded_data_buffer)
 Decode the encoded data buffer by Base64 algorithm. More...
 
static byte[] base64Encode (byte[] data_buffer)
 Encode the source data buffer by Base64 algorithm. More...
 
static byte[] flateCompress (byte[] data_buffer)
 Compress the source data buffer by DEFLATE algorithm. More...
 
static byte[] flateDecompress (byte[] compressed_data_buffer)
 Decompress the compressed data buffer by DEFLATE algorithm. More...
 

Detailed Description

This class provides utility functions such as encoding or compression. Foxit PDF SDK library should has been initialized successfully by function Library.initialize before calling any function of this class.

Member Function Documentation

◆ base64Decode()

static byte[] com.foxit.sdk.common.Codec.base64Decode ( byte[]  encoded_data_buffer)
static

Decode the encoded data buffer by Base64 algorithm.

Decode the encoded data buffer by Base64 algorithm.

Parameters
[in]encoded_data_bufferThe encoded source data buffer.
Returns
The decoded data.
Parameters
[in]encoded_data_bufferThe encoded source data buffer.
Returns
The decoded data.

◆ base64Encode()

static byte[] com.foxit.sdk.common.Codec.base64Encode ( byte[]  data_buffer)
static

Encode the source data buffer by Base64 algorithm.

Encode the source data buffer by Base64 algorithm.

Parameters
[in]data_bufferThe raw source data buffer.
Returns
The encoded data.
Parameters
[in]data_bufferThe raw source data buffer.
Returns
The encoded data.

◆ delete()

synchronized void com.foxit.sdk.common.Codec.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

◆ flateCompress()

static byte[] com.foxit.sdk.common.Codec.flateCompress ( byte[]  data_buffer)
static

Compress the source data buffer by DEFLATE algorithm.

Compress the source data buffer by DEFLATE algorithm.

Parameters
[in]data_bufferThe raw source data buffer.
Returns
The compressed data.
Parameters
[in]data_bufferThe raw source data buffer.
Returns
The compressed data.

◆ flateDecompress()

static byte[] com.foxit.sdk.common.Codec.flateDecompress ( byte[]  compressed_data_buffer)
static

Decompress the compressed data buffer by DEFLATE algorithm.

Decompress the compressed data buffer by DEFLATE algorithm.

Parameters
[in]compressed_data_bufferThe compressed source data buffer.
Returns
The decompressed data.
Parameters
[in]compressed_data_bufferThe compressed source data buffer.
Returns
The decompressed data.