Package org.n52.iceland.response
Class EXIResponseWriter
java.lang.Object
org.n52.iceland.coding.encode.AbstractResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>
org.n52.iceland.response.EXIResponseWriter
- All Implemented Interfaces:
ResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>,Component<ResponseWriterKey>,Keyed<ResponseWriterKey>
public class EXIResponseWriter
extends AbstractResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>
Writer class for
EXIObject
Converts XML documents via EXI encoding using EXISettings.- Since:
- 2.0.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEXIResponseWriter(EncoderRepository encoderRepository, Producer<com.siemens.ct.exi.core.EXIFactory> exiFactory, Producer<org.apache.xmlbeans.XmlOptions> xmlOptions) -
Method Summary
Modifier and TypeMethodDescriptionGet the current contentTypegetKeys()voidsetContentType(MediaType contentType) Set the contentTypebooleansupportsGZip(EXIObject<org.apache.xmlbeans.XmlObject> t) Check if GZip is supported by this writervoidwrite(EXIObject<org.apache.xmlbeans.XmlObject> exiObject, OutputStream out) Write object t toOutputStreamoutvoidwrite(EXIObject<org.apache.xmlbeans.XmlObject> exiObject, OutputStream out, ResponseProxy responseProxy) Write object t toOutputStreamoutMethods inherited from class org.n52.iceland.coding.encode.AbstractResponseWriter
getEncodedContentType, getEncoder, getEncoderRepositoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.n52.iceland.coding.encode.ResponseWriter
getForcedHttpStatus, hasForcedHttpStatus, isSetContentType
-
Field Details
-
KEY
-
-
Constructor Details
-
EXIResponseWriter
public EXIResponseWriter(EncoderRepository encoderRepository, Producer<com.siemens.ct.exi.core.EXIFactory> exiFactory, Producer<org.apache.xmlbeans.XmlOptions> xmlOptions)
-
-
Method Details
-
getKeys
-
write
public void write(EXIObject<org.apache.xmlbeans.XmlObject> exiObject, OutputStream out, ResponseProxy responseProxy) throws IOException, EncodingException Description copied from interface:ResponseWriterWrite object t toOutputStreamout- Parameters:
exiObject- Object to writeout-OutputStreamto be written toresponseProxy-ResponseProxygiving access to header and content length setters- Throws:
IOException- If an error occurs during writingEncodingException- if an errors occurs during encoding
-
write
public void write(EXIObject<org.apache.xmlbeans.XmlObject> exiObject, OutputStream out) throws IOException, EncodingException Description copied from interface:ResponseWriterWrite object t toOutputStreamout- Parameters:
exiObject- Object to writeout-OutputStreamto be written to- Throws:
IOException- If an error occurs during writingEncodingException- if an errors occurs during encoding
-
getContentType
Description copied from interface:ResponseWriterGet the current contentType- Specified by:
getContentTypein interfaceResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>- Overrides:
getContentTypein classAbstractResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>- Returns:
- the contenType
-
setContentType
Description copied from interface:ResponseWriterSet the contentType- Specified by:
setContentTypein interfaceResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>- Overrides:
setContentTypein classAbstractResponseWriter<EXIObject<org.apache.xmlbeans.XmlObject>>- Parameters:
contentType- to set
-
supportsGZip
Description copied from interface:ResponseWriterCheck if GZip is supported by this writer- Parameters:
t- Object to write- Returns:
true, if GZip is supported
-