public class Response extends Message
| Modifier and Type | Class and Description |
|---|---|
static class |
Response.ResponseBuilder |
| Constructor and Description |
|---|
Response() |
getBody, getBodyAsStream, getCharset, getErrorMessage, getHeader, getVersion, hasMsgReleased, isCSS, isDeflate, isGzip, isHTML, isHTTP10, isHTTP11, isImage, isJavaScript, isJSON, isXML, readBody, release, setBody, setBodyContent, setErrorMessage, setHeader, setVersion, toString, write, writeStartLinepublic static Response.ResponseBuilder ok(String msg) throws Exception
Exceptionpublic static Response.ResponseBuilder ok()
public static Response.ResponseBuilder noContent()
public static Response.ResponseBuilder badRequest()
public static Response.ResponseBuilder badRequest(String message)
public static Response.ResponseBuilder continue100()
public static Response.ResponseBuilder redirect(String uri, boolean permanent)
public static Response.ResponseBuilder serverUnavailable(String message)
public static Response.ResponseBuilder interalServerError()
public static Response.ResponseBuilder interalServerError(String message)
public static Response.ResponseBuilder forbidden()
public static Response.ResponseBuilder forbidden(String message)
public static Response.ResponseBuilder unauthorized(String message)
public String getStartLine()
getStartLine in class Messagepublic int getStatusCode()
public void setStatusCode(int statusCode)
public String getStatusMessage()
public void setStatusMessage(String statusMessage)
public void parseStartLine(InputStream in) throws IOException, EndOfStreamException
parseStartLine in class MessageIOExceptionEndOfStreamExceptionpublic void read(InputStream in, boolean createBody) throws IOException, EndOfStreamException
Messageread in class MessageIOExceptionEndOfStreamExceptionprotected void createBody(InputStream in) throws IOException
createBody in class MessageIOExceptionpublic boolean isRedirect()
public boolean hasNoContent()
public boolean isBodyEmpty()
throws IOException
isBodyEmpty in class MessageIOExceptionpublic boolean isUserError()
public boolean isServerError()
public boolean isKeepAlive()
isKeepAlive in class MessageCopyright © 2012. All Rights Reserved.