|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.imageio.ImageReader
org.geotools.image.io.GeographicImageReader
org.geotools.image.io.StreamImageReader
org.geotools.image.io.FileImageReader
public abstract class FileImageReader
Base class for image readers that require File
input source. If the input source
is of other kind, then the content will be copied to a temporary file. This class is used
for image formats backed by some external API (typically C/C++ libraries) working only with
files.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.geotools.image.io.StreamImageReader |
---|
StreamImageReader.Spi |
Field Summary |
---|
Fields inherited from class org.geotools.image.io.StreamImageReader |
---|
closeOnReset |
Fields inherited from class javax.imageio.ImageReader |
---|
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales |
Constructor Summary | |
---|---|
FileImageReader(javax.imageio.spi.ImageReaderSpi spi)
Constructs a new image reader. |
Method Summary | |
---|---|
protected void |
close()
Deletes the temporary file, if any. |
protected java.io.File |
getInputFile()
Returns the input as a file. |
java.lang.String |
getURLEncoding()
Returns the encoding used for URL input. |
boolean |
isRandomAccessEasy(int imageIndex)
Returns true since image readers backed by File
object usually supports random access efficiently. |
protected boolean |
isTemporaryFile()
Returns true if the file given by getInputFile() is a temporary file. |
Methods inherited from class org.geotools.image.io.StreamImageReader |
---|
dispose, finalize, getInputStream, getStreamLength, reset, setInput |
Methods inherited from class org.geotools.image.io.GeographicImageReader |
---|
checkBandIndex, checkImageIndex, collapseNoDataValues, flipVertically, getDefaultReadParam, getDestination, getDimension, getGeographicMetadata, getImageMetadata, getImageTypes, getNumBands, getNumImages, getRawDataType, getRawImageType, getRawImageType, getStreamMetadata, read, warningOccurred |
Methods inherited from class javax.imageio.ImageReader |
---|
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getHeight, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileImageReader(javax.imageio.spi.ImageReaderSpi spi)
provider
- The ImageReaderSpi
that is invoking this constructor,
or null
if none.Method Detail |
---|
public java.lang.String getURLEncoding()
"UTF-8"
in all cases. Subclasses
should override this method if getInputFile()
should converts URL
to File
objects using a different encoding.
protected java.io.File getInputFile() throws java.io.IOException
java.io.FileNotFoundException
- if the file is not found or can not be read.
java.io.IOException
- if a copy was necessary but failed.protected boolean isTemporaryFile()
true
if the file given by getInputFile()
is a temporary file.
public boolean isRandomAccessEasy(int imageIndex) throws java.io.IOException
true
since image readers backed by File
object usually supports random access efficiently.
isRandomAccessEasy
in class javax.imageio.ImageReader
java.io.IOException
protected void close() throws java.io.IOException
close
in class StreamImageReader
java.io.IOException
- if an error occured while closing the stream.StreamImageReader.closeOnReset
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |