org.mgif.connectivity.async
Interface MMItem


public interface MMItem

An interface representing a multimedia message item. This item can hold any text or binary data.

Note that the application must take care of setting the MIME type of the multimedia item correctly.

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.

See Also:
RFC 2045, MGIF

Method Summary
 byte[] getData()
          Returns the item data as an array of bytes.
 int getLength()
          Returns the length, in bytes, of the item data, or -1 if the length is not known.
 java.lang.String getMimeType()
          Returns the MIME type of this item, or null if the type is not known.
 void setData(byte[] data)
          Sets the data of this item.
 java.lang.String setMimeType(java.lang.String type)
          Sets the MIME type of this item.
 

Method Detail

getData

public byte[] getData()
Returns the item data as an array of bytes.
Returns:
the data of this item, or null if the data has not been set

getLength

public int getLength()
Returns the length, in bytes, of the item data, or -1 if the length is not known.
Returns:
an integer containing the length of the item data or -1 if the length is not known

getMimeType

public java.lang.String getMimeType()
Returns the MIME type of this item, or null if the type is not known.
Returns:
a String containing the name of the MIME type, or null if the type is not known

setData

public void setData(byte[] data)
Sets the data of this item. The data may be set to null.
Parameters:
data - item data as a byte array

setMimeType

public java.lang.String setMimeType(java.lang.String type)
Sets the MIME type of this item. The MIME type may include the type of character encoding used, for example, text/html; charset=ISO-8859-4.
Parameters:
type - a String specifying the MIME type of the content


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