public class FlateFilter extends PDFFilter
Note that the attributes for prediction, colors, bitsPerComponent, and columns are not supported when this filter is used to handle the data compression. They are only valid for externally encoded data such as that from a graphics file.
Modifier and Type | Field | Description |
---|---|---|
static int |
PREDICTION_NONE |
The supported mode when this filter is used for data compression
|
static int |
PREDICTION_PNG_AVG |
Mode for externally encoded data.
|
static int |
PREDICTION_PNG_NONE |
Mode for externally encoded data.
|
static int |
PREDICTION_PNG_OPT |
Mode for externally encoded data.
|
static int |
PREDICTION_PNG_PAETH |
Mode for externally encoded data.
|
static int |
PREDICTION_PNG_SUB |
Mode for externally encoded data.
|
static int |
PREDICTION_PNG_UP |
Mode for externally encoded data.
|
static int |
PREDICTION_TIFF2 |
Mode for externally encoded data.
|
Constructor | Description |
---|---|
FlateFilter() |
Modifier and Type | Method | Description |
---|---|---|
java.io.OutputStream |
applyFilter(java.io.OutputStream out) |
Applies a filter to an OutputStream.
|
int |
getBitsPerComponent() |
Get the number of bits per component.
|
int |
getColors() |
Get the colors for this filter.
|
int |
getColumns() |
Get the number of columns for this filter.
|
PDFObject |
getDecodeParms() |
Get the decode params for this filter.
|
java.lang.String |
getName() |
Get the name of this filter.
|
int |
getPredictor() |
Get the predictor for this filter.
|
void |
setBitsPerComponent(int bits) |
Set the number of bits per component.
|
void |
setColors(int colors) |
Set the colors for this filter.
|
void |
setColumns(int columns) |
Set the number of columns for this filter.
|
void |
setPredictor(int predictor) |
Set the predictor for this filter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isApplied, isASCIIFilter, setApplied
public static final int PREDICTION_NONE
public static final int PREDICTION_TIFF2
public static final int PREDICTION_PNG_NONE
public static final int PREDICTION_PNG_SUB
public static final int PREDICTION_PNG_UP
public static final int PREDICTION_PNG_AVG
public static final int PREDICTION_PNG_PAETH
public static final int PREDICTION_PNG_OPT
public java.lang.String getName()
public PDFObject getDecodeParms()
getDecodeParms
in class PDFFilter
public void setPredictor(int predictor) throws PDFFilterException
predictor
- the predictor to usePDFFilterException
- if there is an error with the predictorpublic int getPredictor()
public void setColors(int colors) throws PDFFilterException
colors
- the colors to usePDFFilterException
- if predictor is not PREDICTION_NONEpublic int getColors()
public void setBitsPerComponent(int bits) throws PDFFilterException
bits
- the number of bits per componentPDFFilterException
- if predictor is not PREDICTION_NONEpublic int getBitsPerComponent()
public void setColumns(int columns) throws PDFFilterException
columns
- the number of columns to use for the filterPDFFilterException
- if predictor is not PREDICTION_NONEpublic int getColumns()
public java.io.OutputStream applyFilter(java.io.OutputStream out) throws java.io.IOException
applyFilter
in class PDFFilter
out
- contents to be filteredjava.io.IOException
- In case of an I/O problemCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.