Class AbstractImageIORegistryEntry
- java.lang.Object
-
- org.apache.batik.ext.awt.image.spi.AbstractRegistryEntry
-
- org.apache.batik.ext.awt.image.spi.MagicNumberRegistryEntry
-
- org.apache.batik.ext.awt.image.codec.imageio.AbstractImageIORegistryEntry
-
- All Implemented Interfaces:
ErrorConstants
,RegistryEntry
,StreamRegistryEntry
- Direct Known Subclasses:
ImageIOJPEGRegistryEntry
,ImageIOPNGRegistryEntry
,ImageIOTIFFRegistryEntry
public abstract class AbstractImageIORegistryEntry extends MagicNumberRegistryEntry
This is the base class for all ImageIO-based RegistryEntry implementations. They have a slightly lower priority than the RegistryEntry implementations using the internal codecs, so these take precedence if they are available.- Version:
- $Id: AbstractImageIORegistryEntry.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.batik.ext.awt.image.spi.MagicNumberRegistryEntry
MagicNumberRegistryEntry.MagicNumber
-
-
Field Summary
-
Fields inherited from class org.apache.batik.ext.awt.image.spi.MagicNumberRegistryEntry
PRIORITY
-
Fields inherited from interface org.apache.batik.ext.awt.image.spi.ErrorConstants
ERR_STREAM_FORMAT_UNREADABLE, ERR_STREAM_UNREADABLE, ERR_URL_FORMAT_UNREADABLE, ERR_URL_UNINTERPRETABLE, ERR_URL_UNREACHABLE, RESOURCES
-
-
Constructor Summary
Constructors Constructor Description AbstractImageIORegistryEntry(java.lang.String name, java.lang.String[] exts, java.lang.String[] mimeTypes, MagicNumberRegistryEntry.MagicNumber[] magicNumbers)
ConstructorAbstractImageIORegistryEntry(java.lang.String name, java.lang.String ext, java.lang.String mimeType, int offset, byte[] magicNumber)
Constructor, simplifies construction of entry when only one extension and one magic number is required.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Filter
handleStream(java.io.InputStream inIS, ParsedURL origURL, boolean needRawData)
Decode the Stream into a RenderableImage-
Methods inherited from class org.apache.batik.ext.awt.image.spi.MagicNumberRegistryEntry
getReadlimit, isCompatibleStream
-
Methods inherited from class org.apache.batik.ext.awt.image.spi.AbstractRegistryEntry
getFormatName, getMimeTypes, getPriority, getStandardExtensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.batik.ext.awt.image.spi.RegistryEntry
getFormatName, getMimeTypes, getPriority, getStandardExtensions
-
-
-
-
Constructor Detail
-
AbstractImageIORegistryEntry
public AbstractImageIORegistryEntry(java.lang.String name, java.lang.String[] exts, java.lang.String[] mimeTypes, MagicNumberRegistryEntry.MagicNumber[] magicNumbers)
Constructor- Parameters:
name
- Format Nameexts
- Standard set of extensionsmagicNumbers
- array of magic numbers any of which can match.
-
AbstractImageIORegistryEntry
public AbstractImageIORegistryEntry(java.lang.String name, java.lang.String ext, java.lang.String mimeType, int offset, byte[] magicNumber)
Constructor, simplifies construction of entry when only one extension and one magic number is required.- Parameters:
name
- Format Nameext
- Standard extensionoffset
- Offset of magic numbermagicNumber
- byte array to match.
-
-
Method Detail
-
handleStream
public Filter handleStream(java.io.InputStream inIS, ParsedURL origURL, boolean needRawData)
Decode the Stream into a RenderableImage- Parameters:
inIS
- The input stream that contains the image.origURL
- The original URL, if any, for documentation purposes only. This may be null.needRawData
- If true the image returned should not have any default color correction the file may specify applied.
-
-