public class XmlDocumentServletResponseContent extends Object implements ServletResponseContent
ServletResponseContent
wrapping a org.w3c.Document
.Constructor and Description |
---|
XmlDocumentServletResponseContent(Document document,
String contentType) |
Modifier and Type | Method and Description |
---|---|
String |
getContentAsString()
Get the string representation of the response.
|
Integer |
getContentLength()
Get the size of the response.
|
String |
getContentType()
Get the content type of the servlet response.
|
void |
writeTo(OutputStream outputStream)
Write the response to a stream.
|
public XmlDocumentServletResponseContent(Document document, String contentType) throws IOException
IOException
public String getContentType()
ServletResponseContent
getContentType
in interface ServletResponseContent
public void writeTo(OutputStream outputStream) throws IOException
ServletResponseContent
writeTo
in interface ServletResponseContent
outputStream
- the destination output stream.IOException
- if an error occurred while writing the response to
the stream.public String getContentAsString()
ServletResponseContent
getContentAsString
in interface ServletResponseContent
public Integer getContentLength()
ServletResponseContent
getContentLength
in interface ServletResponseContent
Copyright © 2019 Nu Echo Inc..