public interface ILcyLayerStyleCodec
This interface models a codec (encoder/decoder) for ILcyLayerStyle
objects. The
codec is responsible for storing ILcyLayerStyle
objects to some (persistent)
storage, and to restore the ILcyLayerStyle
objects later on from that (persistent)
storage.
This functionality is currently only supported for Lightspeed layers.
Modifier and Type | Method and Description |
---|---|
boolean |
canDecode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyle)
Returns
true when this codec is capable of adjusting the state of
aLayerStyle to match the settings stored in some (persistent) storage. |
boolean |
canEncode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyle)
Returns
true if the given ILcyLayerStyle , retrieved from
aLayer , can be encoded by this codec. |
void |
decode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyleSFCT,
InputStream aInputStream)
Adjusts the settings of
aLayerStyleSFCT to match those stored in
aInputStream . |
void |
encode(ILcdLayer aLayer,
ILcyLayerStyle aLayerStyle,
OutputStream aOutputStream)
Encodes the given
ILcyLayerStyle to the given OutputStream . |
String |
getDisplayName()
Returns the display name of this decoder
|
String getDisplayName()
boolean canDecode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle)
true
when this codec is capable of adjusting the state of
aLayerStyle
to match the settings stored in some (persistent) storage.aLayer
- The layer from which aLayerStyle
is retrievedaLayerStyle
- The layer style which will be adjusted in the decode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.InputStream)
method with the stored settingstrue
when this decoder is capable of adjusting the state of
aLayerStyle
to match the settings stored in some (persistent) storagedecode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.InputStream)
void decode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) throws IOException, UnsupportedOperationException
Adjusts the settings of aLayerStyleSFCT
to match those stored in
aInputStream
.
aLayer
- The layer from which aLayerStyleSFCT
is retrievedaLayerStyleSFCT
- The layer style of which the settings must be adjusted to match those
stored in aInputStream
aInputStream
- The input stream from which the settings can be readIOException
- in case of IO failureUnsupportedOperationException
- when canDecode
returns false
for
the same layer and layer stylecanDecode(com.luciad.view.ILcdLayer, ILcyLayerStyle)
boolean canEncode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle)
true
if the given ILcyLayerStyle
, retrieved from
aLayer
, can be encoded by this codec.aLayer
- The layer from which aLayerStyle
is retrievedaLayerStyle
- The style of the aLayer
true
if aLayerStyle
can be encoded by this codecencode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.OutputStream)
void encode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) throws IOException, UnsupportedOperationException
Encodes the given ILcyLayerStyle
to the given OutputStream
.
aLayer
- The layer from which aLayerStyle
is retrievedaLayerStyle
- The style of the aLayer
aOutputStream
- The output stream to which the style must be encoded.IOException
- in case of IO failureUnsupportedOperationException
- when canEncode
returns false
for
the same layer and layer stylecanEncode(com.luciad.view.ILcdLayer, ILcyLayerStyle)