javax.microedition.location
Class ExchangeFormatFactory

java.lang.Object
  extended by javax.microedition.location.ExchangeFormatFactory

public class ExchangeFormatFactory
extends java.lang.Object

This class provides a mechanism for applications to obtain instances of different ExchangeFormatHandler objects. These handler classes provide import and export features using certain exchange format. The class also contains method to query what landmark exchange format handlers are supported by the API implementation.

Since:
2.0

Field Summary
static java.lang.String MIME_LMX
          Constant for the MIME type of LMX landmark exchange format.
static java.lang.String MIME_VCARD
          Constant for the MIME type of vCard landmark exchange format.
 
Method Summary
static ExchangeFormatHandler getExchangeFormatHandler(java.lang.String mimeType)
          Constructs an instance of the requested landmark exchange format handler.
static java.lang.String[] getSupportedHandlers()
          Returns a String array listing the MIME types for supported landmark exchange formats.
static boolean isHandlerSupported(java.lang.String mimeType)
          Checks whether the provided landmark exchange format handler is supported by the API implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_LMX

public static final java.lang.String MIME_LMX

Constant for the MIME type of LMX landmark exchange format.

See Also:
Constant Field Values

MIME_VCARD

public static final java.lang.String MIME_VCARD

Constant for the MIME type of vCard landmark exchange format.

See Also:
Constant Field Values
Method Detail

getExchangeFormatHandler

public static ExchangeFormatHandler getExchangeFormatHandler(java.lang.String mimeType)

Constructs an instance of the requested landmark exchange format handler. The String object passed in as the parameter contains the MIME type for the exchange format handler.

Parameters:
mimeType - the MIME type of the landmark exchange format handler
Returns:
an instance of the requested landmark format exchange handler class
Throws:
java.lang.IllegalArgumentException - if mimeType is not supported by the API implementation
java.lang.NullPointerException - if mimeType is null

getSupportedHandlers

public static java.lang.String[] getSupportedHandlers()

Returns a String array listing the MIME types for supported landmark exchange formats. The MIME types do not have to be registered, they can be experimental types and start with x-.

Returns:
the MIME types of supported landmark exchange formats, an empty String array if no exchange formats are supported

isHandlerSupported

public static boolean isHandlerSupported(java.lang.String mimeType)

Checks whether the provided landmark exchange format handler is supported by the API implementation. The mimeType parameter is the MIME type of the landmark exchange format. If mimeType is null, false is returned.

Parameters:
mimeType - the MIME type of the landmark exchange format handler
Returns:
true if exchange format is supported by the API implementation, else false


Copyright © 2003-2008 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.