public class StringResponseContext
extends org.apache.abdera.protocol.server.context.AbstractResponseContext
binary, EMPTY, headers, status, status_text, writer| Constructor and Description |
|---|
StringResponseContext(Exception e,
int status)
Creates a response that can contain a message.
|
StringResponseContext(String message,
int status)
Creates a response that can contain a message.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasEntity()
Whether the response contains an entity.
|
void |
writeTo(OutputStream outputStream)
Method to write the message in to given output.
|
void |
writeTo(OutputStream outputStream,
org.apache.abdera.writer.Writer abderaWriter)
Method to write the message in to given output.
|
void |
writeTo(Writer writer)
Method to write the message in to given output.
|
void |
writeTo(Writer writer,
org.apache.abdera.writer.Writer abderaWriter)
Method to write the message in to given output.
|
addEncodedHeader, addEncodedHeaders, addHeader, addHeaders, getCacheControl, getDateHeader, getHeader, getHeaderNames, getHeaders, getHeaders, getStatus, getStatusText, isBinary, removeHeader, setAge, setAllow, setAllow, setBinary, setContentLanguage, setContentLength, setContentLocation, setContentType, setContentType, setEncodedHeader, setEncodedHeader, setEntityTag, setEntityTag, setEscapedHeader, setExpires, setHeader, setHeader, setLastModified, setLocation, setSlug, setStatus, setStatusText, setWritergetAge, getAllow, getContentLength, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic, setMaxAge, setMustRevalidate, setNoCache, setNoCacheHeaders, setNoStore, setNoTransform, setPrivate, setPrivateHeaders, setProxyRevalidate, setPubliccheck, getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform, toggleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic StringResponseContext(String message, int status)
message - the message.status - the statuspublic StringResponseContext(Exception e, int status)
e - the exception.status - the statuspublic boolean hasEntity()
public void writeTo(OutputStream outputStream) throws IOException
outputStream - the output stream of the HTTP responseIOException - if an error occurred.public void writeTo(Writer writer) throws IOException
writer - the Writer connected to the HTTP responseIOException - if an error occurred.public void writeTo(OutputStream outputStream, org.apache.abdera.writer.Writer abderaWriter) throws IOException
abderaWriter - the abdera writer.outputStream - the output stream of the HTTP response.IOException - if an error occurred.public void writeTo(Writer writer, org.apache.abdera.writer.Writer abderaWriter) throws IOException
abderaWriter - the abdera writer.writer - the Writer connected to the HTTP response.IOException - if an error occurred.Copyright © 2015 WSO2 Inc. All Rights Reserved.