org.apache.fop.pdf
Class FlateFilter

java.lang.Object
  extended byorg.apache.fop.pdf.PDFFilter
      extended byorg.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
static int PREDICTION_NONE
           
static int PREDICTION_PNG_AVG
           
static int PREDICTION_PNG_NONE
           
static int PREDICTION_PNG_OPT
           
static int PREDICTION_PNG_PAETH
           
static int PREDICTION_PNG_SUB
           
static int PREDICTION_PNG_UP
           
static int PREDICTION_TIFF2
           
 
Constructor Summary
FlateFilter()
           
 
Method Summary
 byte[] encode(byte[] data)
          Encode the given data and return it.
 int getBitsPerComponent()
           
 int getColors()
           
 int getColumns()
           
 String getDecodeParms()
          return a parameter dictionary for this filter, or null
 String getName()
          return a PDF string representation of the filter, e.g.
 int getPredictor()
           
 void setBitsPerComponent(int bits)
           
 void setColors(int colors)
           
 void setColumns(int columns)
           
 void setPredictor(int predictor)
           
 
Methods inherited from class org.apache.fop.pdf.PDFFilter
isApplied, setApplied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREDICTION_NONE

public static final int PREDICTION_NONE
See Also:
Constant Field Values

PREDICTION_TIFF2

public static final int PREDICTION_TIFF2
See Also:
Constant Field Values

PREDICTION_PNG_NONE

public static final int PREDICTION_PNG_NONE
See Also:
Constant Field Values

PREDICTION_PNG_SUB

public static final int PREDICTION_PNG_SUB
See Also:
Constant Field Values

PREDICTION_PNG_UP

public static final int PREDICTION_PNG_UP
See Also:
Constant Field Values

PREDICTION_PNG_AVG

public static final int PREDICTION_PNG_AVG
See Also:
Constant Field Values

PREDICTION_PNG_PAETH

public static final int PREDICTION_PNG_PAETH
See Also:
Constant Field Values

PREDICTION_PNG_OPT

public static final int PREDICTION_PNG_OPT
See Also:
Constant Field Values
Constructor Detail

FlateFilter

public FlateFilter()
Method Detail

getName

public String getName()
Description copied from class: PDFFilter
return a PDF string representation of the filter, e.g. /FlateDecode

Specified by:
getName in class PDFFilter

getDecodeParms

public String getDecodeParms()
Description copied from class: PDFFilter
return a parameter dictionary for this filter, or null

Specified by:
getDecodeParms in class PDFFilter

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.

Specified by:
encode in class PDFFilter

setPredictor

public void setPredictor(int predictor)
                  throws PDFFilterException
Throws:
PDFFilterException

getPredictor

public int getPredictor()

setColors

public void setColors(int colors)
               throws PDFFilterException
Throws:
PDFFilterException

getColors

public int getColors()

setBitsPerComponent

public void setBitsPerComponent(int bits)
                         throws PDFFilterException
Throws:
PDFFilterException

getBitsPerComponent

public int getBitsPerComponent()

setColumns

public void setColumns(int columns)
                throws PDFFilterException
Throws:
PDFFilterException

getColumns

public int getColumns()


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.