public class HttpResponse extends Object
| Constructor and Description |
|---|
HttpResponse(javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
flushBuffer() |
void |
flushFileContent(String mimeType,
String fileName,
String fileContent)
Flushes the response as a file.
|
void |
flushFileContent(String mimeType,
String charset,
String fileName,
String fileContent)
Flushes the response as a file.
|
HttpServletResponseHeaders |
getOutputHeaders() |
OutputStream |
getOutputStream() |
int |
getStatus() |
boolean |
isCommitted() |
void |
reset() |
void |
sendEmptyResponse() |
void |
sendError(int status,
String message) |
void |
sendException(int status,
String message) |
void |
sendRedirect(String location) |
static String |
serializeException(String message) |
public HttpResponse(javax.servlet.http.HttpServletResponse response)
public int getStatus()
public void sendEmptyResponse()
public void flushFileContent(String mimeType, String fileName, String fileContent) throws IOException
mimeType - the file mimeType.fileName - the file name.fileContent - the file content.IOExceptionpublic void flushFileContent(String mimeType, String charset, String fileName, String fileContent) throws IOException
mimeType - the file mimeType.charset - the file charset.fileName - the file name.fileContent - the file content.IOExceptionpublic HttpServletResponseHeaders getOutputHeaders()
public OutputStream getOutputStream() throws IOException
IOExceptionpublic void sendError(int status,
String message)
throws IOException
IOExceptionpublic void sendException(int status,
String message)
throws IOException
IOExceptionpublic static String serializeException(String message) throws IOException
IOExceptionpublic void sendRedirect(String location) throws IOException
IOExceptionresponse.sendRedirect(location);public boolean isCommitted()
public void reset()
public void flushBuffer()
throws IOException
IOExceptionCopyright © 2016. All rights reserved.