| Modifier and Type | Field and Description |
|---|---|
static String |
SYSPROP_DEFLATELEVEL
Compression Level System Property.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Filter()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static org.apache.pdfbox.io.RandomAccessRead |
decode(InputStream encoded,
List<Filter> filterList,
COSDictionary parameters,
DecodeOptions options,
List<DecodeResult> results)
Decodes data, with optional DecodeOptions.
|
abstract DecodeResult |
decode(InputStream encoded,
OutputStream decoded,
COSDictionary parameters,
int index)
Decodes data, producing the original non-encoded data.
|
DecodeResult |
decode(InputStream encoded,
OutputStream decoded,
COSDictionary parameters,
int index,
DecodeOptions options)
Decodes data, with optional DecodeOptions.
|
protected abstract void |
encode(InputStream input,
OutputStream encoded,
COSDictionary parameters) |
void |
encode(InputStream input,
OutputStream encoded,
COSDictionary parameters,
int index)
Encodes data.
|
static ImageReader |
findImageReader(String formatName,
String errorCause)
Finds a suitable image raster reader for an image format.
|
static int |
getCompressionLevel() |
protected COSDictionary |
getDecodeParams(COSDictionary dictionary,
int index) |
public static final String SYSPROP_DEFLATELEVEL
Deflater.DEFAULT_COMPRESSION. To set maximum compression, use
System.setProperty(Filter.SYSPROP_DEFLATELEVEL, "9");public abstract DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException
encoded - the encoded byte streamdecoded - the stream where decoded data will be writtenparameters - the parameters used for decodingindex - the index to the filter being decodedIOException - if the stream cannot be decodedpublic DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options) throws IOException
honored flag to test if they were applied.encoded - the encoded byte streamdecoded - the stream where decoded data will be writtenparameters - the parameters used for decodingindex - the index to the filter being decodedoptions - additional options for decodingIOException - if the stream cannot be decodedpublic final void encode(InputStream input, OutputStream encoded, COSDictionary parameters, int index) throws IOException
input - the byte stream to encodeencoded - the stream where encoded data will be writtenparameters - the parameters used for encodingindex - the index to the filter being encodedIOException - if the stream cannot be encodedprotected abstract void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException
IOExceptionprotected COSDictionary getDecodeParams(COSDictionary dictionary, int index)
public static final ImageReader findImageReader(String formatName, String errorCause) throws MissingImageReaderException
formatName - The image format to search for.errorCause - The probably cause if something goes wrong.MissingImageReaderException - if no image reader is found.public static int getCompressionLevel()
public static org.apache.pdfbox.io.RandomAccessRead decode(InputStream encoded, List<Filter> filterList, COSDictionary parameters, DecodeOptions options, List<DecodeResult> results) throws IOException
honored flag to test if they were applied.encoded - the input stream holding the encoded datafilterList - list of filters to be used for decodingparameters - the parameters used for decodingoptions - additional options for decodingresults - list of optional decoding results for each filterIOException - if the stream cannot be decodedCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.