@LcdService(service=ILcdGXYViewEncoder.class, priority=5000) public class TLcdGXYViewPNGEncoder extends Object implements ILcdGXYViewEncoder,ILcdWMSFeatureInfoRequestEncoder
ILcdGXYViewEncoder
and ILcdWMSFeatureInfoRequestEncoder
that can encode a ILcdGXYView
as PNG, with or without selection.
This encoder uses the ObjectPlanet PNG encoder library.
This view encoder allows to set the compression level (see setCompressionLevel(int)
,
getCompressionLevel()
).
This make it possible to determine a trade-off between compression and speed. The possible values are [0 - 9],
with 0 indicating no compression and 9 indicating best compression.
The default value is set to 6.Constructor and Description |
---|
TLcdGXYViewPNGEncoder()
Creates a new
TLcdGXYViewPNGEncoder object. |
Modifier and Type | Method and Description |
---|---|
void |
encode(ILcdGXYLayerSubsetList aSubsetList,
OutputStream aOutputStream,
ILcdGXYView aGXYView)
Encodes the given selection in the
TLcdGXYLayerSubsetList from a given ILcdGXYView
and sends it to the given OutputStream . |
void |
encodeGXYView(ILcdGXYView aGXYView,
OutputStream aOutputStream)
encodes a given
ILcdGXYView to the OutputStream . |
int |
getCompressionLevel()
Returns the compression level.
|
String |
getContentType()
Returns the content MIME type of the encoder.
|
void |
setCompressionLevel(int aCompressionLevel)
Sets the compression level.
|
public TLcdGXYViewPNGEncoder()
TLcdGXYViewPNGEncoder
object.public void encodeGXYView(ILcdGXYView aGXYView, OutputStream aOutputStream) throws IOException
ILcdGXYViewEncoder
ILcdGXYView
to the OutputStream
.encodeGXYView
in interface ILcdGXYViewEncoder
aGXYView
- the ILcdGXYView
to be encoded. aOutputStream
- the OutputStream
to write the encoded view to.IOException
- for any I/O Exceptions.public String getContentType()
ILcdGXYViewEncoder
getContentType
in interface ILcdGXYViewEncoder
getContentType
in interface ILcdWMSFeatureInfoRequestEncoder
String
.public void setCompressionLevel(int aCompressionLevel)
aCompressionLevel
- A compression level.getCompressionLevel()
public int getCompressionLevel()
setCompressionLevel(int)
public void encode(ILcdGXYLayerSubsetList aSubsetList, OutputStream aOutputStream, ILcdGXYView aGXYView) throws javax.servlet.ServletException
ILcdWMSFeatureInfoRequestEncoder
TLcdGXYLayerSubsetList
from a given ILcdGXYView
and sends it to the given OutputStream
.encode
in interface ILcdWMSFeatureInfoRequestEncoder
aSubsetList
- a TLcdGXYLayerSubsetList
containing the selection to be encoded.aOutputStream
- the OutputStream
to write the output to.aGXYView
- the ILcdGXYView
in which the elements are selected .javax.servlet.ServletException
- for writing and sending exceptions.