| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private Set | disabledMappingGenerationKeys
Dynamic mapping generation used for text mappings should not be applied
to the DataFlavors and String natives for which the mappings have been
explicitly specified with |
| private static final String[] | ENCODED_TEXT_CLASSES
The list of valid, encoded text flavor representation classes, in order from best to worst. |
| private final SystemFlavorMap. | flavorsForNativeCache
Caches the result getFlavorsForNative(). |
| private final Map | flavorToNative
Maps DataFlavors (or base type Strings for text DataFlavors) to Lists of native Strings. |
| private static final String | HTML_TEXT_BASE_TYPE
A String representing text/html MIME type. |
| private static final String[] | |
| private boolean | isMapInitialized
Shows if the object has been initialized. |
| private static String | JavaMIME
Constant prefix used to tag Java types converted to native platform type. |
| private final SystemFlavorMap. | nativesForFlavorCache
Caches the result of getNativesForFlavor(). |
| private final Map | nativeToFlavor
Maps native Strings to Lists of DataFlavors (or base type Strings for text DataFlavors). |
| private static final String | TEXT_PLAIN_BASE_TYPE
A String representing text/plain MIME type. |
| private Map | textTypeToNative
Maps a text DataFlavor primary mime-type to the native. |
| private static final String[] | UNICODE_TEXT_CLASSES
The list of valid, decoded text flavor representation classes, in order from best to worst. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | addFlavorForUnencodedNative(String
the nat, DataFlavor String native key for the mappingthe flav)DataFlavor value for the mappingAdds a mapping from a single |
| public synchronized void | addUnencodedNativeForFlavor(DataFlavor
the flav, String DataFlavor key for the mappingthe nat)String native value for the mappingAdds a mapping from the specified |
| private static Set | |
| public static DataFlavor | Returns: the decodedDataFlavor, or null if nat is
not an encoded String nativethe nat)String to decodeDecodes a |
| public static String | Returns: the decoded Java MIME type, ornull if nat is not
an encoded String nativethe nat)String to decodeDecodes a |
| public static String | Returns: the encodedString, or null if flav is
null or has a null MIME typethe flav)DataFlavor to encodeEncodes a |
| public static String | Returns: the encodedString, or null if mimeType
is nullthe MIME type to encode mimeType)Encodes a MIME type for use as a |
| private LinkedHashSet | flavorToNativeLookup(final DataFlavor flav, final boolean synthesize)
Semantically equivalent to 'flavorToNative.get(flav)'. |
| public static FlavorMap | Returns: the default FlavorMap for this thread's ClassLoaderReturns the default FlavorMap for this thread's ClassLoader. |
| public synchronized List | Returns: ajava.util.List of DataFlavor objects into which
platform-specific data in the specified, platform-specific native
can be translatedthe native whose corresponding nat)DataFlavors should be
returned. If null is specified, all DataFlavors
currently known to the data transfer subsystem are returned in a
non-deterministic order.Implements java. Returns a |
| public synchronized Map | Returns: ajava.util.Map of String natives to
DataFlavorsan array of natives)Strings which will be the key set of
the returned Map. If null is specified, a mapping
of all supported String natives to their most preferred
DataFlavors will be returned.Implements java. Returns a |
| private synchronized Map | |
| public synchronized List | Returns: ajava.util.List of java.lang.String objects
which are platform-specific representations of platform-specific
data formatsthe flav)DataFlavor whose corresponding natives should be
returned. If null is specified, all natives currently
known to the data transfer subsystem are returned in a
non-deterministic order.Implements java. Returns a |
| public synchronized Map | Returns: ajava.util.Map of DataFlavors to String
nativesan array of flavors)DataFlavors which will be the key set
of the returned Map. If null is specified, a
mapping of all DataFlavors known to the data transfer
subsystem to their most preferred String natives will be
returned.Implements java. Returns a |
| private Map | |
| private synchronized Map | |
| private static LinkedHashSet | |
| private void | |
| public static boolean | Returns: true if the String is encoded; false
otherwisethe str)String to testReturns whether the specified |
| private static String | |
| private LinkedHashSet | |
| public synchronized void | setFlavorsForNative(String
the nat, DataFlavor[] String native key for the mappingsthe flavors)DataFlavor values for the mappingsDiscards the current mappings for the specified |
| public synchronized void | setNativesForFlavor(DataFlavor
the flav, String[] DataFlavor key for the mappingsthe natives)String native values for the mappingsDiscards the current mappings for the specified |
| private <H, L> void | store(H hashed, L listed, Map<H, LinkedHashSet<L>> map)
Stores the listed object under the specified hash key in map. |
| disabledMappingGenerationKeys | back to summary |
|---|---|
| private Set<Object> disabledMappingGenerationKeys Dynamic mapping generation used for text mappings should not be applied
to the DataFlavors and String natives for which the mappings have been
explicitly specified with | |
| ENCODED_TEXT_CLASSES | back to summary |
|---|---|
| private static final String[] ENCODED_TEXT_CLASSES The list of valid, encoded text flavor representation classes, in order from best to worst. | |
| flavorsForNativeCache | back to summary |
|---|---|
| private final SystemFlavorMap. Caches the result getFlavorsForNative(). Maps String natives to SoftReferences which reference LinkedHashSet of DataFlavors. | |
| flavorToNative | back to summary |
|---|---|
| private final Map<DataFlavor, LinkedHashSet<String>> flavorToNative Maps DataFlavors (or base type Strings for text DataFlavors) to Lists of native Strings.
Do not use the field directly, use | |
| HTML_TEXT_BASE_TYPE | back to summary |
|---|---|
| private static final String HTML_TEXT_BASE_TYPE A String representing text/html MIME type. | |
| htmlDocumentTypes | back to summary |
|---|---|
| private static final String[] htmlDocumentTypes | |
| isMapInitialized | back to summary |
|---|---|
| private boolean isMapInitialized Shows if the object has been initialized. | |
| JavaMIME | back to summary |
|---|---|
| private static String JavaMIME Constant prefix used to tag Java types converted to native platform type. | |
| nativesForFlavorCache | back to summary |
|---|---|
| private final SystemFlavorMap. Caches the result of getNativesForFlavor(). Maps DataFlavors to SoftReferences which reference LinkedHashSet of String natives. | |
| nativeToFlavor | back to summary |
|---|---|
| private final Map<String, LinkedHashSet<DataFlavor>> nativeToFlavor Maps native Strings to Lists of DataFlavors (or base type Strings for text DataFlavors).
Do not use the field directly, use | |
| TEXT_PLAIN_BASE_TYPE | back to summary |
|---|---|
| private static final String TEXT_PLAIN_BASE_TYPE A String representing text/plain MIME type. | |
| textTypeToNative | back to summary |
|---|---|
| private Map<String, LinkedHashSet<String>> textTypeToNative Maps a text DataFlavor primary mime-type to the native. Used only to
store standard mappings registered in the
Do not use this field directly, use | |
| UNICODE_TEXT_CLASSES | back to summary |
|---|---|
| private static final String[] UNICODE_TEXT_CLASSES The list of valid, decoded text flavor representation classes, in order from best to worst. | |
| SystemFlavorMap | back to summary |
|---|---|
| private SystemFlavorMap() | |
| addFlavorForUnencodedNative | back to summary |
|---|---|
| public synchronized void addFlavorForUnencodedNative(String nat, DataFlavor flav) Adds a mapping from a single
| |
| addUnencodedNativeForFlavor | back to summary |
|---|---|
| public synchronized void addUnencodedNativeForFlavor(DataFlavor flav, String nat) Adds a mapping from the specified
| |
| convertMimeTypeToDataFlavors | back to summary |
|---|---|
private static Set
| |
| decodeDataFlavor | back to summary |
|---|---|
| public static DataFlavor decodeDataFlavor(String nat) throws ClassNotFoundException Decodes a
| |
| decodeJavaMIMEType | back to summary |
|---|---|
| public static String decodeJavaMIMEType(String nat) Decodes a | |
| encodeDataFlavor | back to summary |
|---|---|
| public static String encodeDataFlavor(DataFlavor flav) Encodes a
String of the specified DataFlavor prefixed with
JAVA_DATAFLAVOR:.
| |
| encodeJavaMIMEType | back to summary |
|---|---|
| public static String encodeJavaMIMEType(String mimeType) Encodes a MIME type for use as a
String prefixed with JAVA_DATAFLAVOR:.
| |
| flavorToNativeLookup | back to summary |
|---|---|
| private LinkedHashSet Semantically equivalent to 'flavorToNative.get(flav)'. This method handles the case where 'flav' is not found in 'flavorToNative' depending on the value of passes 'synthesize' parameter. If 'synthesize' is SYNTHESIZE_IF_NOT_FOUND a native is synthesized, stored, and returned by encoding the DataFlavor's MIME type. Otherwise an empty List is returned and 'flavorToNative' remains unaffected. | |
| getDefaultFlavorMap | back to summary |
|---|---|
| public static FlavorMap getDefaultFlavorMap() Returns the default FlavorMap for this thread's ClassLoader.
| |
| getFlavorsForNative | back to summary |
|---|---|
| public synchronized List Implements java. Returns a
If the specified native is previously unknown to the data transfer
subsystem, and that native has been properly encoded, then invoking this
method will establish a mapping in both directions between the specified
native and a
If the specified native is not a properly encoded native and the mappings
for this native have not been altered with
| |
| getFlavorsForNatives | back to summary |
|---|---|
| public synchronized Map Implements java. Returns a
If a specified native is previously unknown to the data transfer
subsystem, and that native has been properly encoded, then invoking this
method will establish a mapping in both directions between the specified
native and a
| |
| getFlavorToNative | back to summary |
|---|---|
| private synchronized Map Accessor to flavorToNative map. Since we use lazy initialization we must use this accessor instead of direct access to the field which may not be initialized yet. This method will initialize the field if needed.
| |
| getNativesForFlavor | back to summary |
|---|---|
| public synchronized List Implements java. Returns a
If the specified
| |
| getNativesForFlavors | back to summary |
|---|---|
| public synchronized Map Implements java. Returns a
If a specified
| |
| getNativeToFlavor | back to summary |
|---|---|
| private Map Accessor to nativeToFlavor map. Since we use lazy initialization we must use this accessor instead of direct access to the field which may not be initialized yet. This method will initialize the field if needed.
| |
| getTextTypeToNative | back to summary |
|---|---|
| private synchronized Map An accessor to textTypeToNative map. Since we use lazy initialization we must use this accessor instead of direct access to the field which may not be initialized yet. This method will initialize the field if needed.
| |
| handleHtmlMimeTypes | back to summary |
|---|---|
| private static LinkedHashSet | |
| initSystemFlavorMap | back to summary |
|---|---|
| private void initSystemFlavorMap() Initializes a SystemFlavorMap by reading | |
| isJavaMIMEType | back to summary |
|---|---|
| public static boolean isJavaMIMEType(String str) Returns whether the specified
| |
| loadConvert | back to summary |
|---|---|
| private static String loadConvert(String theString) | |
| nativeToFlavorLookup | back to summary |
|---|---|
| private LinkedHashSet Semantically equivalent to 'nativeToFlavor.get(nat)'. This method handles the case where 'nat' is not found in 'nativeToFlavor'. In that case, a new DataFlavor is synthesized, stored, and returned, if and only if the specified native is encoded as a Java MIME type. | |
| setFlavorsForNative | back to summary |
|---|---|
| public synchronized void setFlavorsForNative(String nat, DataFlavor[] flavors) Discards the current mappings for the specified
If the array contains several elements that reference equal
It is recommended that client code not reset mappings established by the data transfer subsystem. This method should only be used for application-level mappings.
| |
| setNativesForFlavor | back to summary |
|---|---|
| public synchronized void setNativesForFlavor(DataFlavor flav, String[] natives) Discards the current mappings for the specified
If the array contains several elements that reference equal
It is recommended that client code not reset mappings established by the data transfer subsystem. This method should only be used for application-level mappings.
| |
| store | back to summary |
|---|---|
| private <H, L> void store(H hashed, L listed, Map<H, LinkedHashSet<L>> map) Stores the listed object under the specified hash key in map. Unlike a standard map, the listed object will not replace any object already at the appropriate Map location, but rather will be appended to a List stored in that location. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public LinkedHashSet | |
| public void | |
| public void |
| cache | back to summary |
|---|---|
| pack-priv Map<K, SoftReference<LinkedHashSet<V>>> cache | |
| SoftCache | back to summary |
|---|---|
| private SoftCache() | |
| check | back to summary |
|---|---|
| public LinkedHashSet | |
| put | back to summary |
|---|---|
| public void put(K key, LinkedHashSet<V> value) | |
| remove | back to summary |
|---|---|
| public void remove(K key) | |