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 forEXIObjectConverts XML documents via EXI encoding usingEXISettings.- Since:
- 2.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static ResponseWriterKeyKEY
-
Constructor Summary
Constructors Constructor Description EXIResponseWriter(EncoderRepository encoderRepository, Producer<com.siemens.ct.exi.core.EXIFactory> exiFactory, Producer<org.apache.xmlbeans.XmlOptions> xmlOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaTypegetContentType()Get the current contentTypeSet<ResponseWriterKey>getKeys()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, ResponseProxy responseProxy)Write object t toOutputStreamout-
Methods inherited from class org.n52.iceland.coding.encode.AbstractResponseWriter
getEncodedContentType, getEncoder, getEncoderRepository
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.iceland.coding.encode.ResponseWriter
getForcedHttpStatus, hasForcedHttpStatus, isSetContentType
-
-
-
-
Field Detail
-
KEY
public static final ResponseWriterKey KEY
-
-
Constructor Detail
-
EXIResponseWriter
public EXIResponseWriter(EncoderRepository encoderRepository, Producer<com.siemens.ct.exi.core.EXIFactory> exiFactory, Producer<org.apache.xmlbeans.XmlOptions> xmlOptions)
-
-
Method Detail
-
getKeys
public Set<ResponseWriterKey> 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
-
getContentType
public MediaType 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
public void setContentType(MediaType contentType)
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
public boolean supportsGZip(EXIObject<org.apache.xmlbeans.XmlObject> t)
Description copied from interface:ResponseWriterCheck if GZip is supported by this writer- Parameters:
t- Object to write- Returns:
true, if GZip is supported
-
-