ImageReader
| Modifier and Type | Field and Description |
|---|---|
| private JBIG2Document | document
JBIG2 document to which we delegate current work. |
| private JBIG2Globals | globals
Globals are JBIG2 segments for PDF wide use. |
| Access | Constructor and Description |
|---|---|
| public | JBIG2ImageReader(ImageReaderSpi
- The originatingProvider)ImageReaderSpi that is invoking this constructor, or null.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canReadRaster()
Overrides javax. Returns |
| public JBIG2ReadParam | getDefaultReadParam()
Overrides javax. Returns a default |
| private JBIG2ReadParam | getDefaultReadParam(final int
- The page number. imageIndex)Returns a default ImageReadParam object for a specific page. |
| private JBIG2Document | |
| public JBIG2Globals | |
| public int | Returns: The height of the specified page or0 if an error occurred.- The image index. In this case it is the page number. imageIndex)Implements abstract javax. Calculates the height of the specified page. |
| public IIOMetadata | Returns: The associatedJBIG2ImageMetadata.the index of the image whose metadata is to
be retrieved. imageIndex)Implements abstract javax. Simply returns the |
| public Iterator | Returns: AnIterator for available image types.- The page number. imageIndex)Implements abstract javax. Returns the iterator for available image types. |
| public int | getNumImages(boolean
if allowSearch)true, the true number of
images will be returned even if a search is required. If
false, the reader may return -1
without performing the search.Implements abstract javax. Returns the number of images, not including thumbnails, available from the current input source. |
| private JBIG2Page | |
| public IIOMetadata | Returns: null at every call.Implements abstract javax. This ImageIO plugin doesn't record |
| public int | Returns: The width of the specified page.- The image index. In this case it is the page number. imageIndex)Implements abstract javax. Calculates the width of the specified page. |
| public JBIG2Globals | Returns: The decodedJBIG2Globals.- The input stream of globals data. globalsInputStream)Decodes and returns the global segments. |
| public BufferedImage | read(int
the index of the image to be retrieved. imageIndex, ImageReadParam an param)ImageReadParam used to control
the reading process, or null.Implements abstract javax. Returns the decoded image of specified page considering the given |
| public Raster | readRaster(int
the index of the image to be read. imageIndex, ImageReadParam an param)ImageReadParam used to control
the reading process, or null.Overrides javax. Returns a new |
| public void | |
| public void | setInput(Object
the input, boolean ImageInputStream or other
Object to use for future decoding.if seekForwardOnly, boolean true, images and metadata
may only be read in ascending order from this input source.if ignoreMetadata)true, metadata
may be ignored during reads.Overrides javax. Sets the input source to use to the given
|
| document | back to summary |
|---|---|
| private JBIG2Document document JBIG2 document to which we delegate current work. | |
| globals | back to summary |
|---|---|
| private JBIG2Globals globals Globals are JBIG2 segments for PDF wide use. | |
| JBIG2ImageReader | back to summary |
|---|---|
public JBIG2ImageReader(ImageReaderSpi originatingProvider) throws IOException
| |
| canReadRaster | back to summary |
|---|---|
| public boolean canReadRaster() Overrides javax. Doc from javax. Returns The default implementation returns
| |
| getDefaultReadParam | back to summary |
|---|---|
| public JBIG2ReadParam getDefaultReadParam() Overrides javax. Doc from javax. Returns a default The default implementation constructs and returns a new
| |
| getDefaultReadParam | back to summary |
|---|---|
| private JBIG2ReadParam getDefaultReadParam(final int imageIndex) Returns a default ImageReadParam object for a specific page.
| |
| getDocument | back to summary |
|---|---|
| private JBIG2Document getDocument() throws IOException | |
| getGlobals | back to summary |
|---|---|
| public JBIG2Globals getGlobals() throws IOException 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.
| |
| getHeight | back to summary |
|---|---|
| public int getHeight(int imageIndex) throws IOException Implements abstract javax. Calculates the height of the specified page.
| |
| getImageMetadata | back to summary |
|---|---|
| public IIOMetadata getImageMetadata(int imageIndex) throws IOException Implements abstract javax. Simply returns the
| |
| getImageTypes | back to summary |
|---|---|
| public Iterator Implements abstract javax. Returns the iterator for available image types.
| |
| getNumImages | back to summary |
|---|---|
| public int getNumImages(boolean allowSearch) throws IOException Implements abstract javax. Doc from javax. Returns the number of images, not including thumbnails, available from the current input source. Note that some image formats (such as animated GIF) do not
specify how many images are present in the stream. Thus
determining the number of images will require the entire stream
to be scanned and may require memory for buffering. If images
are to be processed in order, it may be more efficient to
simply call
| |
| getPage | back to summary |
|---|---|
| private JBIG2Page getPage(int imageIndex) throws IOException | |
| getStreamMetadata | back to summary |
|---|---|
| public IIOMetadata getStreamMetadata() Implements abstract javax. This ImageIO plugin doesn't record
| |
| getWidth | back to summary |
|---|---|
| public int getWidth(int imageIndex) throws IOException Implements abstract javax. Calculates the width of the specified page.
| |
| processGlobals | back to summary |
|---|---|
| public JBIG2Globals processGlobals(ImageInputStream globalsInputStream) throws IOException Decodes and returns the global segments.
| |
| read | back to summary |
|---|---|
| public BufferedImage read(int imageIndex, ImageReadParam param) throws IOException Implements abstract javax. Returns the decoded image of specified page considering the given
| |
| readRaster | back to summary |
|---|---|
| public Raster readRaster(int imageIndex, ImageReadParam param) throws IOException Overrides javax. Doc from javax. Returns a new This method allows formats that normally apply a color conversion, such as JPEG, and formats that do not normally have an associated colorspace, such as remote sensing or medical imaging data, to provide access to raw pixel data. Any registered If If the supplied The default implementation throws an
| |
| setGlobals | back to summary |
|---|---|
| public void setGlobals(JBIG2Globals globals) throws IOException Simply sets the globals.
| |
| setInput | back to summary |
|---|---|
| public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata) Overrides javax. Doc from javax. Sets the input source to use to the given
The The Subclasses should take care to remove any cached information based on the previous stream, such as header information or partially decoded image data. Use of a general The default implementation checks the
| |