javax.servlet
Interface ServletResponse
- HttpServletResponse
public interface ServletResponse
A servlet can use this class to pass information to the client.
flushBuffer
public void flushBuffer()
throws IOException
XXX
getBufferSize
public int getBufferSize()
XXX
getCharacterEncoding
public String getCharacterEncoding()
Returns the characterset encoding in use by this Response
- the characterset encoding
getLocale
public Locale getLocale()
XXX
getOutputStream
public ServletOutputStream getOutputStream()
throws IOException
Creates a ServletOutputStream for the servlet to write the data to.
setContentLength
and setContentType
can
only be called before anything is written to this stream.
It is only possible to call getWriter
or
getOutputStream
on a response, but not both.
- ServletOutputStream to write binary data
getWriter
public PrintWriter getWriter()
throws IOException
Creates a PrintWriter for the servlet to print text to.
The contenttype must be set before calling this method.
It is only possible to call getWriter
or
getOutputStream
on a response, but not both.
isCommitted
public boolean isCommitted()
XXX
reset
public void reset()
XXX
setBufferSize
public void setBufferSize(int size)
XXX
setContentLength
public void setContentLength(int length)
Tells the client how many bytes to expect.
length
- the number of bytes in the reply
setContentType
public void setContentType(String type)
Tells the client what mime type to expect
type
- the mime type of the content
setLocale
public void setLocale(Locale locale)
XXX