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, writeStartLine
public static Response.ResponseBuilder ok(String msg) throws Exception
Exception
public 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 Message
public 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 Message
IOException
EndOfStreamException
public void read(InputStream in, boolean createBody) throws IOException, EndOfStreamException
Message
read
in class Message
IOException
EndOfStreamException
protected void createBody(InputStream in) throws IOException
createBody
in class Message
IOException
public boolean isRedirect()
public boolean hasNoContent()
public boolean isBodyEmpty() throws IOException
isBodyEmpty
in class Message
IOException
public boolean isUserError()
public boolean isServerError()
public boolean isKeepAlive()
isKeepAlive
in class Message
Copyright © 2012. All Rights Reserved.