Package org.apache.pdfbox.jbig2
Class JBIG2ImageReader
java.lang.Object
javax.imageio.ImageReader
org.apache.pdfbox.jbig2.JBIG2ImageReader
-
Field Summary
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns decoded segments that has been set as globals.intgetHeight(int imageIndex) getImageMetadata(int imageIndex) getImageTypes(int imageIndex) intgetNumImages(boolean allowSearch) This ImageIO plugin doesn't recordIIOMetadata.intgetWidth(int imageIndex) processGlobals(ImageInputStream globalsInputStream) Decodes and returns the global segments.read(int imageIndex, ImageReadParam param) readRaster(int imageIndex, ImageReadParam param) voidsetGlobals(JBIG2Globals globals) Simply sets the globals.voidMethods inherited from class javax.imageio.ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, reset, setInput, setInput, setLocale
-
Constructor Details
-
JBIG2ImageReader
- Throws:
IOException- if something went wrong while reading the provided stream.
-
-
Method Details
-
getDefaultReadParam
- Overrides:
getDefaultReadParamin classImageReader
-
getWidth
- Specified by:
getWidthin classImageReader- Throws:
IOException
-
getHeight
- Specified by:
getHeightin classImageReader- Throws:
IOException
-
getImageMetadata
- Specified by:
getImageMetadatain classImageReader- Throws:
IOException
-
getImageTypes
- Specified by:
getImageTypesin classImageReader- Throws:
IOException
-
getNumImages
- Specified by:
getNumImagesin classImageReader- Throws:
IOException
-
getStreamMetadata
This ImageIO plugin doesn't recordIIOMetadata.- Specified by:
getStreamMetadatain classImageReader- Returns:
nullat every call.
-
getGlobals
Returns decoded segments that has been set as globals. Globals are jbig2 segments that are used in embedded case for file wide access. They are not assigned to a specific page.- Returns:
- Decoded global segments.
- Throws:
IOException- if an error occurs reading the height information from the input source.
-
read
- Specified by:
readin classImageReader- Throws:
IOException
-
canReadRaster
public boolean canReadRaster()- Overrides:
canReadRasterin classImageReader
-
readRaster
- Overrides:
readRasterin classImageReader- Throws:
IOException
-
processGlobals
Decodes and returns the global segments.- Parameters:
globalsInputStream- - The input stream of globals data.- Returns:
- The decoded
JBIG2Globals. - Throws:
IOException- if an error occurs reading the height information from the input source.
-
setGlobals
Simply sets the globals.- Parameters:
globals- - The globals to set.- Throws:
IOException- if an error occurs
-
setInput
- Overrides:
setInputin classImageReader
-