org.mgif.connectivity.sync
Interface Response

All Superinterfaces:
Attributes

public interface Response
extends Attributes

Defines an object to assist in sending a response to the client.

See Also:
MGIF

Method Summary
 int getBufferSize()
          Returns the actual buffer size used for the response.
 java.lang.String getCharacterEncoding()
          Returns the name of the charset used for the MIME body sent in this response.
 java.util.Locale getLocale()
          Returns the locale assigned to the response.
 java.io.OutputStream getOutputStream()
          Returns a OutputStream suitable for writing binary data in the response.
 java.io.PrintWriter getWriter()
          Returns a PrintWriter object that can send character text to the client.
 void setBufferSize(int i)
          Sets the preferred buffer size for the body of the response.
 void setContentLength(int i)
          Sets the length of the content body in the response.
 void setContentType(java.lang.String s)
          Sets the content type of the response being sent to the client.
 void setLocale(java.util.Locale locale)
          Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate.
 
Methods inherited from interface org.mgif.connectivity.transfer.Attributes
getAttribute, getAttributeNames, getAttributes, isAttribute, removeAttribute, setAttribute
 

Method Detail

getBufferSize

public int getBufferSize()
Returns the actual buffer size used for the response. If no buffering is used, this method returns 0.
Returns:
the actual buffer size used

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Returns the name of the charset used for the MIME body sent in this response.

See the Internet RFCs such as RFC 2045 for more information on MIME. Protocols such as SMTP and HTTP define profiles of MIME, and those standards are still evolving.

Returns:
a String specifying the name of the charset, for example, ISO-8859-1
See Also:
RFC 2045

getLocale

public java.util.Locale getLocale()
Returns the locale assigned to the response.
Returns:
the locale of the response

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns a OutputStream suitable for writing binary data in the response.
Returns:
a OutputStream for writing binary data
Throws:
IOException - if an input or output exception occurred

getWriter

public java.io.PrintWriter getWriter()
                              throws java.io.IOException
Returns a PrintWriter object that can send character text to the client.
Returns:
a PrintWriter object that can return character data to the client
Throws:
IOException - if an input or output exception occurred

setBufferSize

public void setBufferSize(int i)
Sets the preferred buffer size for the body of the response.
Parameters:
i - the preferred buffer size

setContentLength

public void setContentLength(int i)
Sets the length of the content body in the response.
Parameters:
i - an integer specifying the length of the content being returned to the client.

setContentType

public void setContentType(java.lang.String s)
Sets the content type of the response being sent to the client.

See the Internet RFCs such as RFC 2045 for more information on MIME. Protocols such as SMTP and HTTP define profiles of MIME, and those standards are still evolving.

Parameters:
s - a String specifying the MIME type of the content
See Also:
RFC 2045

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate.
Parameters:
locale - the locale of the response


Copyright © 2002 Mobile Games Interoperability Forum. All rights reserved.
This source code is protected by the legal notice posted at http://www.mgif.org/docs/notice.html