org.foray.graphic.factory
Class TIFFFactory
java.lang.Object
org.foray.graphic.factory.GraphicFactory
org.foray.graphic.factory.TIFFFactory
public class TIFFFactory
- extends GraphicFactory
ImageReader object for TIFF image type.
Field Summary |
protected static byte[] |
BIG_ENDIAN_HEADER
File header indicating that the file is a TIFF file in big-endian
(Motorola) format. |
protected static byte[] |
LITTLE_ENDIAN_HEADER
File header indicating that the file is a TIFF file in little-endian
(Intel) format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LITTLE_ENDIAN_HEADER
protected static final byte[] LITTLE_ENDIAN_HEADER
- File header indicating that the file is a TIFF file in little-endian
(Intel) format.
BIG_ENDIAN_HEADER
protected static final byte[] BIG_ENDIAN_HEADER
- File header indicating that the file is a TIFF file in big-endian
(Motorola) format.
TIFFFactory
public TIFFFactory(GraphicServer4a server)
- Constructor.
- Parameters:
server
- The parent graphic server.
attemptCreate
public TIFFGraphic attemptCreate(URL url,
BufferedInputStream bis)
throws IOException
- Description copied from class:
GraphicFactory
- Subclasses implement this method to try to create an appropriate Graphic
instance. Note that this superclass handles the task of marking and
resetting the input stream, so all the subclass needs to do is read the
stream.
- Specified by:
attemptCreate
in class GraphicFactory
- Parameters:
url
- The URL which contains the graphic content.bis
- The reusable input stream containing the bytes from url
.
- Returns:
- The newly-created Graphic instance, or null if this factory was
unable to create such an instance.
- Throws:
IOException
- For IO errors.
Copyright © 2017. All rights reserved.