Top Description Fields Constructors Methods
org.apache.pdfbox.filter

pack-priv final Class DCTFilter

extends Filter
Class Inheritance
Imports
java.awt.color.CMMException, java.awt.image.BufferedImage, .DataBufferByte, .Raster, .WritableRaster, java.io.IOException, .InputStream, .OutputStream, javax.imageio.IIOException, .ImageIO, .ImageReadParam, .ImageReader, javax.imageio.metadata.IIOMetadata, .IIOMetadataNode, javax.imageio.stream.ImageInputStream, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSDictionary, org.w3c.dom.Element, .NodeList

Decompresses data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard.
Author
John Hewson

Field Summary

Modifier and TypeField and Description
private static final String
private static final Log
private static final int
Inherited from org.apache.pdfbox.filter.Filter:
SYSPROP_DEFLATELEVEL

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private int
clamp(float value)

public DecodeResult
decode(InputStream
the encoded byte stream
encoded
,
OutputStream
the stream where decoded data will be written
decoded
,
COSDictionary
the parameters used for decoding
parameters
,
int
the index to the filter being decoded
index
,
DecodeOptions
additional options for decoding
options
)

Overrides org.apache.pdfbox.filter.Filter.decode.

Decodes data, with optional DecodeOptions.

public DecodeResult
decode(InputStream
the encoded byte stream
encoded
,
OutputStream
the stream where decoded data will be written
decoded
,
COSDictionary
the parameters used for decoding
parameters
,
int
the index to the filter being decoded
index
)

Implements abstract org.apache.pdfbox.filter.Filter.decode.

Decodes data, producing the original non-encoded data.

protected void
private WritableRaster
private WritableRaster
private Integer
private int
private String
private Raster
Inherited from org.apache.pdfbox.filter.Filter:
decodeencodefindImageReaderfindRasterReadergetCompressionLevelgetDecodeParams

Field Detail

ADOBEback to summary
private static final String ADOBE
LOGback to summary
private static final Log LOG

Hides org.apache.pdfbox.filter.Filter.LOG.

POS_TRANSFORMback to summary
private static final int POS_TRANSFORM

Constructor Detail

DCTFilterback to summary
pack-priv DCTFilter()

Method Detail

clampback to summary
private int clamp(float value)
decodeback to summary
public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options) throws IOException

Overrides org.apache.pdfbox.filter.Filter.decode.

Doc from org.apache.pdfbox.filter.Filter.decode.

Decodes data, with optional DecodeOptions. Not all filters support all options, and so callers should check the options' honored flag to test if they were applied.

Parameters
encoded:InputStream

the encoded byte stream

decoded:OutputStream

the stream where decoded data will be written

parameters:COSDictionary

the parameters used for decoding

index:int

the index to the filter being decoded

options:DecodeOptions

additional options for decoding

Returns:DecodeResult

repaired parameters dictionary, or the original parameters dictionary

Annotations
@Override
Exceptions
IOException:
if the stream cannot be decoded
decodeback to summary
public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException

Implements abstract org.apache.pdfbox.filter.Filter.decode.

Doc from org.apache.pdfbox.filter.Filter.decode.

Decodes data, producing the original non-encoded data.

Parameters
encoded:InputStream

the encoded byte stream

decoded:OutputStream

the stream where decoded data will be written

parameters:COSDictionary

the parameters used for decoding

index:int

the index to the filter being decoded

Returns:DecodeResult

repaired parameters dictionary, or the original parameters dictionary

Annotations
@Override
Exceptions
IOException:
if the stream cannot be decoded
encodeback to summary
protected void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException

Implements abstract org.apache.pdfbox.filter.Filter.encode.

Annotations
@Override
fromBGRtoRGBback to summary
private WritableRaster fromBGRtoRGB(Raster raster)
fromYCCKtoCMYKback to summary
private WritableRaster fromYCCKtoCMYK(Raster raster)
getAdobeTransformback to summary
private Integer getAdobeTransform(IIOMetadata metadata)
getAdobeTransformByBruteForceback to summary
private int getAdobeTransformByBruteForce(ImageInputStream iis) throws IOException
getNumChannelsback to summary
private String getNumChannels(ImageReader reader)
readImageRasterback to summary
private Raster readImageRaster(ImageReader reader, ImageReadParam irp) throws IOException