|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ServletResponse
A servlet can use this class to pass information to the client.
| Method Summary | |
|---|---|
void |
flushBuffer()
XXX |
int |
getBufferSize()
XXX |
java.lang.String |
getCharacterEncoding()
Returns the characterset encoding in use by this Response |
java.util.Locale |
getLocale()
XXX |
ServletOutputStream |
getOutputStream()
Creates a ServletOutputStream for the servlet to write the data to. |
java.io.PrintWriter |
getWriter()
Creates a PrintWriter for the servlet to print text to. |
boolean |
isCommitted()
XXX |
void |
reset()
XXX |
void |
setBufferSize(int size)
XXX |
void |
setContentLength(int length)
Tells the client how many bytes to expect. |
void |
setContentType(java.lang.String type)
Tells the client what mime type to expect |
void |
setLocale(java.util.Locale locale)
XXX |
| Method Detail |
|---|
void setContentLength(int length)
length - the number of bytes in the replyvoid setContentType(java.lang.String type)
type - the mime type of the content
ServletOutputStream getOutputStream()
throws java.io.IOException
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.
java.io.IOException - if a i/o exception occurs
java.lang.IllegalStateException - if getWriter was already
called on this response
java.io.PrintWriter getWriter()
throws java.io.IOException
getWriter or
getOutputStream on a response, but not both.
java.io.IOException - if a i/o exception occurs
java.lang.IllegalStateException - if getOutputStream was
already called on this response
java.io.UnsupportedEncodingException - if no suitable character
encoding can be usedjava.lang.String getCharacterEncoding()
void setBufferSize(int size)
int getBufferSize()
void reset()
boolean isCommitted()
void flushBuffer()
throws java.io.IOException
java.io.IOExceptionvoid setLocale(java.util.Locale locale)
java.util.Locale getLocale()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||