public interface ILcdEarthTileDataCodec
ALcdEarthTile.getData()
from
or to a TLcdEarthTileRepository
.Modifier and Type | Method and Description |
---|---|
Object |
decodeTileData(InputStream aSource)
Decodes tile data from the given input stream.
|
default void |
encodeTile(ALcdEarthTile aTile,
OutputStream aDestination)
Encodes a tile to the given output stream.
|
void |
encodeTileData(Object aTileData,
OutputStream aDestination)
Encodes tile data to the given output stream.
|
TLcdEarthTileFormat |
getDecodedTileFormat()
Returns the tile data format that this codec can encode or
decode.
|
TLcdEarthTileFormat |
getEncodedDataFormat()
Returns the format in which this codec encodes data.
|
Object decodeTileData(InputStream aSource) throws IOException
getDecodedTileFormat()
.aSource
- the input stream from which to read the tile dataIOException
- if the tile data cannot be decodedvoid encodeTileData(Object aTileData, OutputStream aDestination) throws IOException
aTileData
parameter must be an object of the type returned by getDecodedTileFormat()
.aTileData
- the tile data to be encodedaDestination
- the output stream to which to encode the tile dataIOException
- if the tile data cannot be encodeddefault void encodeTile(ALcdEarthTile aTile, OutputStream aDestination) throws IOException
aTile
parameter must contain an object of the type returned by getDecodedTileFormat()
.
By default, this method delegates to encodeTileData(Object, OutputStream)
.aTile
- the tile to be encodedaDestination
- the output stream to which to encode the tile dataIOException
- if the tile cannot be encodedTLcdEarthTileFormat getDecodedTileFormat()
aTile
parameter of encodeTileData()
should always be of this type, as should the return value of
decodeTileData()
.TLcdEarthTileFormat getEncodedDataFormat()
getDecodedTileFormat()
to retrieve an
appropriate tile data codec for any particular tile.