org.cruxframework.crux.core.server.rest.spi
Class HttpResponse
java.lang.Object
org.cruxframework.crux.core.server.rest.spi.HttpResponse
public class HttpResponse
- extends Object
- Author:
- Thiago da Rosa de Bustamante
|
Constructor Summary |
HttpResponse(javax.servlet.http.HttpServletResponse response)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpResponse
public HttpResponse(javax.servlet.http.HttpServletResponse response)
getStatus
public int getStatus()
sendEmptyResponse
public void sendEmptyResponse()
flushFileContent
public void flushFileContent(String mimeType,
String fileName,
String fileContent)
throws IOException
- Flushes the response as a file.
- Parameters:
mimeType - the file mimeType.fileName - the file name.fileContent - the file content.
- Throws:
IOException
flushFileContent
public void flushFileContent(String mimeType,
String charset,
String fileName,
String fileContent)
throws IOException
- Flushes the response as a file.
- Parameters:
mimeType - the file mimeType.charset - the file charset.fileName - the file name.fileContent - the file content.
- Throws:
IOException
getOutputHeaders
public HttpServletResponseHeaders getOutputHeaders()
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Throws:
IOException
sendError
public void sendError(int status,
String message)
throws IOException
- Throws:
IOException
sendException
public void sendException(int status,
String message)
throws IOException
- Throws:
IOException
serializeException
public static String serializeException(String message)
throws IOException
- Throws:
IOException
sendRedirect
public void sendRedirect(String location)
throws IOException
- Throws:
IOException- See Also:
response.sendRedirect(location);
isCommitted
public boolean isCommitted()
reset
public void reset()
flushBuffer
public void flushBuffer()
throws IOException
- Throws:
IOException
Copyright © 2014. All rights reserved.