Class TLcdGXYViewJPEGEncoder
java.lang.Object
com.luciad.wms.server.viewencoder.TLcdGXYViewJPEGEncoder
- All Implemented Interfaces:
ILcdGXYViewEncoder,ILcdWMSFeatureInfoRequestEncoder
@LcdService(service=ILcdGXYViewEncoder.class)
public class TLcdGXYViewJPEGEncoder
extends Object
implements ILcdGXYViewEncoder, ILcdWMSFeatureInfoRequestEncoder
Class implement
ILcdGXYViewEncoder and ILcdWMSFeatureInfoRequestEncoder.
This encoder encodes a ILcdGXYView as JPEG, with or without selection.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(ILcdGXYLayerSubsetList aSelectionSublist, OutputStream aOutputStream, ILcdGXYView aGXYView) Encodes theILcdGXYViewto a JPEG and writes in to the givenOutputStrean.encodeGXYView(ILcdGXYView aView, OutputStream aOutputStream, ALcdRequestContext aRequestContext) Encodes a givenILcdGXYViewto the providedOutputStream.Returns a content type that identifies the encoding approach used by this encoder and that gets advertised in the OGC service capabilities.static booleanDeprecated.This method has been deprecated.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdGXYViewJPEGEncoder
public TLcdGXYViewJPEGEncoder()
-
-
Method Details
-
isClassTraceOn
public static boolean isClassTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
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 istruethen 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.
-
encodeGXYView
public String encodeGXYView(ILcdGXYView aView, OutputStream aOutputStream, ALcdRequestContext aRequestContext) throws IOException Description copied from interface:ILcdGXYViewEncoderEncodes a givenILcdGXYViewto the providedOutputStream.- Specified by:
encodeGXYViewin interfaceILcdGXYViewEncoder- Parameters:
aView- theILcdGXYViewto be encoded. You can rely on itsgetImagemethod to access the rendered view.aOutputStream- theOutputStreamto write the encoded view to.aRequestContext- anALcdRequestContextgiving access to the request parameters. Can benull.- Returns:
- the content type used by the encoding. This is set as content type on the HTTP(S) response and cannot be
null. - Throws:
IOException- if an I/O exception occurs during the encoding
-
getContentType
Description copied from interface:ILcdGXYViewEncoderReturns a content type that identifies the encoding approach used by this encoder and that gets advertised in the OGC service capabilities. This is usually the MIME type of the encoded result, but this is not required: it is up to theencodeGXYViewmethod to return the actually used content type for a givenILcdGXYView.- Specified by:
getContentTypein interfaceILcdGXYViewEncoder- Specified by:
getContentTypein interfaceILcdWMSFeatureInfoRequestEncoder- Returns:
- the content type that identifies the encoding approach used by this encoder
-
encode
public void encode(ILcdGXYLayerSubsetList aSelectionSublist, OutputStream aOutputStream, ILcdGXYView aGXYView) throws jakarta.servlet.ServletException Encodes theILcdGXYViewto a JPEG and writes in to the givenOutputStrean. The elements of the givenTLcdGXYLayerSubsetListare painted in theILcdGXYViewin the selection color.- Specified by:
encodein interfaceILcdWMSFeatureInfoRequestEncoder- Parameters:
aSelectionSublist- aTLcdGXYLayerSubsetListcontaining the selection to be encoded.aOutputStream- theOutputStreamto write the output to.aGXYView- theILcdGXYViewin which the elements are selected .- Throws:
jakarta.servlet.ServletException- for writing and sending exceptions.- See Also:
-