org.apache.fop.pdf
Class FlateFilter

org.apache.fop.pdf.PDFFilter
  |
  +--org.apache.fop.pdf.FlateFilter

public class FlateFilter
extends PDFFilter

A filter to deflate a stream. 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.


Field Summary
 final static intPREDICTION_NONE
           
 final static intPREDICTION_PNG_AVG
           
 final static intPREDICTION_PNG_NONE
           
 final static intPREDICTION_PNG_OPT
           
 final static intPREDICTION_PNG_PAETH
           
 final static intPREDICTION_PNG_SUB
           
 final static intPREDICTION_PNG_UP
           
 final static intPREDICTION_TIFF2
           

Method Summary
 byte[]encode(byte[] data)
          Encode the given data and return it.
 intgetBitsPerComponent()
           
 intgetColors()
           
 intgetColumns()
           
 StringgetDecodeParms()
           
 StringgetName()
           
 intgetPredictor()
           
 voidsetBitsPerComponent(int bits)
           
 voidsetColors(int colors)
           
 voidsetColumns(int columns)
           
 voidsetPredictor(int predictor)
           

Methods inherited from class org.apache.fop.pdf.PDFFilter
isApplied, setApplied

Field Detail

PREDICTION_NONE

public final static int PREDICTION_NONE

PREDICTION_PNG_AVG

public final static int PREDICTION_PNG_AVG

PREDICTION_PNG_NONE

public final static int PREDICTION_PNG_NONE

PREDICTION_PNG_OPT

public final static int PREDICTION_PNG_OPT

PREDICTION_PNG_PAETH

public final static int PREDICTION_PNG_PAETH

PREDICTION_PNG_SUB

public final static int PREDICTION_PNG_SUB

PREDICTION_PNG_UP

public final static int PREDICTION_PNG_UP

PREDICTION_TIFF2

public final static int PREDICTION_TIFF2
Method Detail

encode

public byte[] encode(byte[] data)
Encode the given data and return it. Note: a side effect of this method is that it resets the prediction to the default because these attributes are not supported. So the DecodeParms should be retrieved after calling this method.

getBitsPerComponent

public int getBitsPerComponent()

getColors

public int getColors()

getColumns

public int getColumns()

getDecodeParms

public String getDecodeParms()

getName

public String getName()

getPredictor

public int getPredictor()

setBitsPerComponent

public void setBitsPerComponent(int bits)
throws PDFFilterException

setColors

public void setColors(int colors)
throws PDFFilterException

setColumns

public void setColumns(int columns)
throws PDFFilterException

setPredictor

public void setPredictor(int predictor)
throws PDFFilterException