JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.datatransfer
Class MimeToOSTypeMapper

java.lang.Object
  |
  +--com.apple.mrj.datatransfer.MimeToOSTypeMapper

Deprecated. As of MacOSX 10.2

public class MimeToOSTypeMapper
extends Object

A utility class that maps MIME flavors into OSTypes, and defines an extra 'mime' flavor that can be used on the receiving end (i.e. by an OSTypeToMimeMapper) to reconstitute the original flavors.

See Also:
OSTypeToMimeMapper

Field Summary
static String kSerializedType
          Deprecated. The base MIME type defined by DataFlavor to store serialized Java objects.
static MRJOSType kTypeMimeMap
          Deprecated. The magic meta-flavor whose data contains the mapping between OSTypes and MIME types.
 
Constructor Summary
MimeToOSTypeMapper()
          Deprecated.  
 
Method Summary
 byte[] getMimeMap()
          Deprecated. Returns the OSType-to-MIME-type map as a byte array.
 MRJOSType mapFlavor(DataFlavor flavor)
          Deprecated. Maps a DataFlavor to an OSType.
 DataFlavor unmapFlavor(MRJOSType osType)
          Deprecated. Returns the DataFlavor corresponding to a particular OSType returned from mapFlavor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kTypeMimeMap

public static final MRJOSType kTypeMimeMap
Deprecated. 
The magic meta-flavor whose data contains the mapping between OSTypes and MIME types.

kSerializedType

public static final String kSerializedType
Deprecated. 
The base MIME type defined by DataFlavor to store serialized Java objects. In actual use a "class" parameter must be added whose value is the full classname of the object.
See Also:
#getFullMimeType
Constructor Detail

MimeToOSTypeMapper

public MimeToOSTypeMapper()
Deprecated. 
Method Detail

mapFlavor

public MRJOSType mapFlavor(DataFlavor flavor)
Deprecated. 
Maps a DataFlavor to an OSType. If the DataFlavor is an OSTypeFlavor, its actual OSType is returned. Otherwise an OSType is synthesized and remembered in the mapping table.
Returns:
The OSType in int form, or 0 if the flavor cannot be used.

unmapFlavor

public DataFlavor unmapFlavor(MRJOSType osType)
Deprecated. 
Returns the DataFlavor corresponding to a particular OSType returned from mapFlavor. The OSType presumably came from a previous call to mapFlavor, but if it didn't, reasonable effort will be made to map it back to a sensible MIME type.

getMimeMap

public byte[] getMimeMap()
Deprecated. 
Returns the OSType-to-MIME-type map as a byte array. This data should go into the native 'mime' flavor.

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.