Package com.luciad.format.raster
Class ALcdTileDecoder
java.lang.Object
com.luciad.format.raster.ALcdTileDecoder
- All Implemented Interfaces:
ILcdTileDecoder
,ILcdInputStreamFactoryCapable
- Direct Known Subclasses:
TLcdBCITileDecoder
,TLcdBILTileDecoder
,TLcdBMPImageDecoder
,TLcdCADRGImageDecoder
,TLcdDEMTileDecoder
,TLcdDMEDTileDecoder
,TLcdDTEDTileDecoder
,TLcdGIFImageDecoder
,TLcdGRIBTileDecoder
,TLcdNITFUncompressedImageDecoder
,TLcdPNMImageDecoder
,TLcdPPMImageDecoder
,TLcdTileDecoder
public abstract class ALcdTileDecoder
extends Object
implements ILcdTileDecoder, ILcdInputStreamFactoryCapable
This class is an abstract basis for implementing
ILcdTileDecoder
. When reading a tile, it uses a given input
stream factory to create an input stream. Extensions only need to implement
the abstract method readTileFromStream(java.io.InputStream, int, int, int, int, int, com.luciad.util.ILcdBuffer)
to decode data from the input
stream.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the factory that creates the input streams from which tiles are decoded.boolean
Deprecated.This method has been deprecated.readTile
(String aFileName, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from a file.readTile
(URL aURL, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from a URL.protected abstract ILcdTileInfo
readTileFromStream
(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer) Reads a sub-tile from an input stream.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the factory that will create the input streams from which tiles can be decoded.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
ALcdTileDecoder
public ALcdTileDecoder()
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn
- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setInputStreamFactory
Sets the factory that will create the input streams from which tiles can be decoded.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- the input stream factory to be used.
-
getInputStreamFactory
Returns the factory that creates the input streams from which tiles are decoded.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used.
-
readTile
public ILcdTileInfo readTile(String aFileName, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException Description copied from interface:ILcdTileDecoder
Reads a sub-tile from a file.- Specified by:
readTile
in interfaceILcdTileDecoder
- Parameters:
aFileName
- the name of the file containing the tile.aImageIndex
- the index of the tile in the given file (if applicable).aSubTileWidth
- the width of the sub-tiles, expressed in pixels.aSubTileHeight
- the height of the sub-tiles, expressed in pixels.aRowIndex
- the row number of the sub-tile to be decoded.aColumnIndex
- the column number of the sub-tile to be decoded.aBuffer
- the buffer in which the decoded bytes will be stored.- Returns:
ILcdTileInfo
information about the decoded tile.- Throws:
TLcdCodecException
- in case of decoding problems.
-
readTile
public ILcdTileInfo readTile(URL aURL, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException Description copied from interface:ILcdTileDecoder
Reads a sub-tile from a URL.- Specified by:
readTile
in interfaceILcdTileDecoder
- Parameters:
aURL
- the URL containing the tile.aImageIndex
- the index of the tile in the given URL (if applicable).aSubTileWidth
- the width of the sub-tiles, expressed in pixels.aSubTileHeight
- the height of the sub-tiles, expressed in pixels.aRowIndex
- the row number of the sub-tile to be decoded.aColumnIndex
- the column number of the sub-tile to be decoded.aBuffer
- the buffer in which the decoded bytes will be stored.- Returns:
ILcdTileInfo
information about the decoded tile.- Throws:
TLcdCodecException
- in case of decoding problems.
-
readTileFromStream
protected abstract ILcdTileInfo readTileFromStream(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException Reads a sub-tile from an input stream.- Parameters:
aInputStream
- the input stream from which the tile data can be read.aImageIndex
- the index of the tile in the given input stream (if applicable).aSubTileWidth
- the width of the sub-tiles, expressed in pixels.aSubTileHeight
- the height of the sub-tiles, expressed in pixels.aSubTileRowIndex
- the row number of the sub-tile to be decoded.aSubTileColumnIndex
- the column number of the sub-tile to be decoded.aBuffer
- the buffer in which the decoded bytes will be stored.- Returns:
ILcdTileInfo
information about the decoded tile.- Throws:
TLcdCodecException
- in case of decoding problems.
-