## org.apache.fop.pdf
Class FlateFilter

    java.lang.Object
      |
      +--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
`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()`
`java.lang.String` `getDecodeParms()` return a parameter dictionary for this filter, or null
`java.lang.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

### PREDICTION_TIFF2

    public static final int PREDICTION_TIFF2

### PREDICTION_PNG_NONE

    public static final int PREDICTION_PNG_NONE

### PREDICTION_PNG_SUB

    public static final int PREDICTION_PNG_SUB

### PREDICTION_PNG_UP

    public static final int PREDICTION_PNG_UP

### PREDICTION_PNG_AVG

    public static final int PREDICTION_PNG_AVG

### PREDICTION_PNG_PAETH

    public static final int PREDICTION_PNG_PAETH

### PREDICTION_PNG_OPT

    public static final int PREDICTION_PNG_OPT

Constructor Detail

### FlateFilter

    public FlateFilter()

Method Detail

### getName

    public java.lang.String getName()

  Description copied from class: PDFFilter
  return a PDF string representation of the filter, e.g. /FlateDecode
  Overrides:
    getName in class PDFFilter

### getDecodeParms

    public java.lang.String getDecodeParms()

  Description copied from class: PDFFilter
  return a parameter dictionary for this filter, or null
  Overrides:
    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.
  Overrides:
    encode in class PDFFilter

### setPredictor

    public void setPredictor(int predictor)
                      throws PDFFilterException

### getPredictor

    public int getPredictor()

### setColors

    public void setColors(int colors)
                   throws PDFFilterException

### getColors

    public int getColors()

### setBitsPerComponent

    public void setBitsPerComponent(int bits)
                             throws PDFFilterException

### getBitsPerComponent

    public int getBitsPerComponent()

### setColumns

    public void setColumns(int columns)
                    throws PDFFilterException

### getColumns

    public int getColumns()

Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.