Package org.loboevolution.pdfview.decode
Class Predictor
java.lang.Object
org.loboevolution.pdfview.decode.Predictor
- Direct Known Subclasses:
PNGPredictor
,TIFFPredictor
The abstract superclass of various predictor objects that undo well-known
prediction algorithms.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Predictor
(int algorithm) Create an instance of a predictor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Predictor
getPredictor
(PDFObject params) Get an instance of a predictorabstract ByteBuffer
unpredict
(ByteBuffer imageData) Actually perform this algorithm on decoded image data.
-
Field Details
-
TIFF
public static final int TIFFwell known algorithms- See Also:
-
PNG
public static final int PNGConstantPNG=1
- See Also:
-
-
Constructor Details
-
Predictor
protected Predictor(int algorithm) Create an instance of a predictor. UsegetPredictor()
instead of this.- Parameters:
algorithm
- aInteger
object.
-
-
Method Details
-
getPredictor
Get an instance of a predictor- Parameters:
params
- the filter parameters- Returns:
- a
Predictor
object. - Throws:
IOException
- if any.
-
unpredict
Actually perform this algorithm on decoded image data. Subclasses must implement this method- Parameters:
imageData
- aByteBuffer
object.- Returns:
- a
ByteBuffer
object. - Throws:
IOException
- if any.
-