All Packages Class Hierarchy This Package Previous Next Index
Interface Acme.Serve.servlet.ServletResponse
- public interface ServletResponse
-
getCharacterEncoding()
- Returns the character set encoding used for this MIME body.
-
getOutputStream()
- Returns an output stream for writing response data.
-
getWriter()
- Returns a print writer for writing response data.
-
setContentLength(int)
- Sets the content length for this response.
-
setContentType(String)
- Sets the content type for this response.
setContentLength
public abstract void setContentLength(int len)
- Sets the content length for this response.
- Parameters:
- len - the content length
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
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
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
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