public abstract class ALcdTileDecoder extends Object implements ILcdTileDecoder, ILcdInputStreamFactoryCapable
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 and Description |
---|
ALcdTileDecoder() |
Modifier and Type | Method and Description |
---|---|
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the factory that creates the input streams from which tiles are
decoded.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
ILcdTileInfo |
readTile(String aFileName,
int aImageIndex,
int aSubTileWidth,
int aSubTileHeight,
int aRowIndex,
int aColumnIndex,
ILcdBuffer aBuffer)
Reads a sub-tile from a file.
|
ILcdTileInfo |
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. It is recommended to use the
standard Java logging framework directly.
|
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. It is recommended to use the
standard Java logging framework directly.
|
public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.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.public boolean isTraceOn()
true
if tracing is enabled for this class.public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used.public ILcdInputStreamFactory getInputStreamFactory()
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
public ILcdTileInfo readTile(String aFileName, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
ILcdTileDecoder
readTile
in interface ILcdTileDecoder
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.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.public ILcdTileInfo readTile(URL aURL, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aRowIndex, int aColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
ILcdTileDecoder
readTile
in interface ILcdTileDecoder
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.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.protected abstract ILcdTileInfo readTileFromStream(InputStream aInputStream, int aImageIndex, int aSubTileWidth, int aSubTileHeight, int aSubTileRowIndex, int aSubTileColumnIndex, ILcdBuffer aBuffer) throws TLcdCodecException
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.ILcdTileInfo
information about the decoded tile.TLcdCodecException
- in case of decoding problems.