All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Acme.Serve.servlet.ServletResponse

public interface ServletResponse

Method Index

 o getCharacterEncoding()
Returns the character set encoding used for this MIME body.
 o getOutputStream()
Returns an output stream for writing response data.
 o getWriter()
Returns a print writer for writing response data.
 o setContentLength(int)
Sets the content length for this response.
 o setContentType(String)
Sets the content type for this response.

Methods

 o setContentLength
 public abstract void setContentLength(int len)
Sets the content length for this response.

Parameters:
len - the content length
 o setContentType
 public abstract void setContentType(String type)
Sets the content type for this response. This type may later be implicitly modified by addition of properties such as the MIME charset= if the service finds it necessary, and the appropriate media type property has not been set. This response property may only be assigned one time.

Parameters:
type - the content type
 o getOutputStream
 public abstract ServletOutputStream getOutputStream() throws IOException
Returns an output stream for writing response data.

Throws: IllegalStateException
if getWriter has been called
Throws: IOException
on other I/O errors
 o getWriter
 public abstract PrintWriter getWriter() throws IOException
Returns a print writer for writing response data. The MIME type of the response will be modified, if necessary, to reflect the character encoding used, through the charset=... property. This means that the content type must be set before calling this method.

Throws: UnsupportedEncodingException
if no such encoding can be provided
Throws: IllegalStateException
if getOutputStream has been called
Throws: IOException
on other I/O errors
 o getCharacterEncoding
 public abstract String getCharacterEncoding()
Returns the character set encoding used for this MIME body. The character encoding is either the one specified in the assigned content type, or one which the client understands. If no content type has yet been assigned, it is implicitly set to text/plain.


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs