- All Known Subinterfaces:
HttpServletResponse
,WebApplicationResponse
,WebApplicationServerResponse
- All Known Implementing Classes:
DefaultWebApplicationResponse
,DefaultWebApplicationServerResponse
,EmbeddedResponse
,HttpServletResponseWrapper
,NanoResponse
,ServletResponseWrapper
public interface ServletResponse
The ServletResponse API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and Type Method Description void
flushBuffer()
Flush the buffer.int
getBufferSize()
Get the buffer size.java.lang.String
getCharacterEncoding()
Get the character encoding.java.lang.String
getContentType()
Get the content type.java.util.Locale
getLocale()
Get the locale.ServletOutputStream
getOutputStream()
Get the output stream.java.io.PrintWriter
getWriter()
Get the writer.boolean
isCommitted()
Is committed.void
reset()
Reset.void
resetBuffer()
Reset the buffer.void
setBufferSize(int bufferSize)
Set the buffer size.void
setCharacterEncoding(java.lang.String characterEncoding)
Set the character encoding.void
setContentLength(int contentLength)
Set the content length.void
setContentLengthLong(long contentLength)
Set the content length.void
setContentType(java.lang.String contentType)
Set the content type.void
setLocale(java.util.Locale locale)
Set the locale.
-
Method Details
-
flushBuffer
void flushBuffer() throws java.io.IOExceptionFlush the buffer.- Throws:
java.io.IOException
- when an I/O error occurs.
-
getBufferSize
int getBufferSize()Get the buffer size.- Returns:
- the buffer size.
-
getCharacterEncoding
java.lang.String getCharacterEncoding()Get the character encoding.- Returns:
- the character encoding.
-
getContentType
java.lang.String getContentType()Get the content type.- Returns:
- the content type.
-
getLocale
java.util.Locale getLocale()Get the locale.- Returns:
- the locale.
-
getOutputStream
Get the output stream.- Returns:
- the output stream.
- Throws:
java.io.IOException
- when an I/O error occurs.
-
getWriter
java.io.PrintWriter getWriter() throws java.io.IOExceptionGet the writer.- Returns:
- the writer.
- Throws:
java.io.IOException
- when an I/O error occurs.
-
isCommitted
boolean isCommitted()Is committed.- Returns:
- true if it is, false otherwise.
-
reset
void reset()Reset. -
resetBuffer
void resetBuffer()Reset the buffer. -
setBufferSize
void setBufferSize(int bufferSize)Set the buffer size.- Parameters:
bufferSize
- the buffer size.
-
setCharacterEncoding
void setCharacterEncoding(java.lang.String characterEncoding)Set the character encoding.- Parameters:
characterEncoding
- the character encoding.
-
setContentLength
void setContentLength(int contentLength)Set the content length.- Parameters:
contentLength
- the content length.
-
setContentLengthLong
void setContentLengthLong(long contentLength)Set the content length.- Parameters:
contentLength
- the content length.
-
setContentType
void setContentType(java.lang.String contentType)Set the content type.- Parameters:
contentType
- the content type.
-
setLocale
void setLocale(java.util.Locale locale)Set the locale.- Parameters:
locale
- the locale.
-