| Modifier and Type | Class and Description |
|---|---|
| private static class | DataFlavorUtil.
An IndexedComparator which compares two String charsets. |
| private static class | DataFlavorUtil.
An IndexedComparator which compares two DataFlavors. |
| private static class | DataFlavorUtil.
A fallback implementation of |
| private static class | DataFlavorUtil.
Given the Map that maps objects to Integer indices and a boolean value, this Comparator imposes a direct or reverse order on set of objects. |
| public static class | DataFlavorUtil.
A class that provides access to |
| private static class | DataFlavorUtil.
Lazy initialization of Standard Encodings. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | textMIMESubtypeCharsetSupport
Tracks whether a particular text/* MIME type supports the charset parameter. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | |
| pack-priv static <T> int | Returns: a negative integer, zero, or a positive integer as the first object is mapped to a less, equal to, or greater index than the secondthe map which maps objects into Integer indexes indexMap, T the first object to be compared obj1, T the second object to be compared obj2, Integer the Integer to be used as a fallback index fallbackIndex)Helper method to compare two objects by their Integer indices in the given map. |
| public static boolean | doesSubtypeSupportCharset(DataFlavor flavor)
Tests only whether the flavor's MIME type supports the charset parameter. |
| public static boolean | |
| private static Comparator | |
| public static Comparator | |
| public static DesktopDatatransferService | |
| public static Comparator | |
| public static String | getTextCharset(DataFlavor flavor)
If the specified flavor is a text flavor which supports the "charset" parameter, then this method returns that parameter, or the default charset if no such parameter was specified at construction. |
| public static Comparator | |
| private static boolean | isEncodingSupported(String encoding)
Determines whether this JRE can both encode and decode text in the specified encoding. |
| public static boolean | isFlavorCharsetTextType(DataFlavor flavor)
Returns whether this flavor is a text type which supports the 'charset' parameter. |
| public static boolean | isFlavorNoncharsetTextType(DataFlavor flavor)
Returns whether this flavor is a text type which does not support the 'charset' parameter. |
| public static Set | standardEncodings()
Returns a |
| textMIMESubtypeCharsetSupport | back to summary |
|---|---|
| private static final Map<String, Boolean> textMIMESubtypeCharsetSupport Tracks whether a particular text/* MIME type supports the charset parameter. The Map is initialized with all of the standard MIME types listed in the DataFlavor.selectBestTextFlavor method comment. Additional entries may be added during the life of the JRE for text/<other> types. | |
| DataFlavorUtil | back to summary |
|---|---|
| private DataFlavorUtil() | |
| canonicalName | back to summary |
|---|---|
| public static String canonicalName(String encoding) Converts an arbitrary text encoding to its canonical name. | |
| compareIndices | back to summary |
|---|---|
| pack-priv static <T> int compareIndices(Map<T, Integer> indexMap, T obj1, T obj2, Integer fallbackIndex) Helper method to compare two objects by their Integer indices in the given map. If the map doesn't contain an entry for either of the objects, the fallback index will be used for the object instead.
| |
| doesSubtypeSupportCharset | back to summary |
|---|---|
| public static boolean doesSubtypeSupportCharset(DataFlavor flavor) Tests only whether the flavor's MIME type supports the charset parameter. Must only be called for flavors with a primary type of "text". | |
| doesSubtypeSupportCharset | back to summary |
|---|---|
| public static boolean doesSubtypeSupportCharset(String subType, String charset) | |
| getCharsetComparator | back to summary |
|---|---|
| private static Comparator | |
| getDataFlavorComparator | back to summary |
|---|---|
| public static Comparator | |
| getDesktopService | back to summary |
|---|---|
| public static DesktopDatatransferService getDesktopService() | |
| getIndexOrderComparator | back to summary |
|---|---|
| public static Comparator | |
| getTextCharset | back to summary |
|---|---|
| public static String getTextCharset(DataFlavor flavor) If the specified flavor is a text flavor which supports the "charset"
parameter, then this method returns that parameter, or the default
charset if no such parameter was specified at construction. For non-text
DataFlavors, and for non-charset text flavors, this method returns
| |
| getTextFlavorComparator | back to summary |
|---|---|
| public static Comparator | |
| isEncodingSupported | back to summary |
|---|---|
| private static boolean isEncodingSupported(String encoding) Determines whether this JRE can both encode and decode text in the specified encoding. | |
| isFlavorCharsetTextType | back to summary |
|---|---|
| public static boolean isFlavorCharsetTextType(DataFlavor flavor) Returns whether this flavor is a text type which supports the 'charset' parameter. | |
| isFlavorNoncharsetTextType | back to summary |
|---|---|
| public static boolean isFlavorNoncharsetTextType(DataFlavor flavor) Returns whether this flavor is a text type which does not support the 'charset' parameter. | |
| standardEncodings | back to summary |
|---|---|
| public static Set Returns a | |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final Integer | |
| pack-priv static final DataFlavorUtil. | |
| private static final Integer | |
| private static final String | |
| private static final Integer | |
| private static final Integer |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: a negative integer, zero, or a positive integer as the first argument is worse, equal to, or better than the secondthe first charset to be compared charset1, String the second charset to be compared charset2)Implements java. Compares charsets. |
| pack-priv static String | Returns: an encoding for this charsetthe charset charset)Returns encoding for the specified charset according to the following rules:
|
| charsets | back to summary |
|---|---|
| private static final Map<String, Integer> charsets | |
| DEFAULT_CHARSET_INDEX | back to summary |
|---|---|
| private static final Integer DEFAULT_CHARSET_INDEX | |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final DataFlavorUtil. | |
| OTHER_CHARSET_INDEX | back to summary |
|---|---|
| private static final Integer OTHER_CHARSET_INDEX | |
| UNSUPPORTED_CHARSET | back to summary |
|---|---|
| private static final String UNSUPPORTED_CHARSET | |
| UNSUPPORTED_CHARSET_INDEX | back to summary |
|---|---|
| private static final Integer UNSUPPORTED_CHARSET_INDEX | |
| WORST_CHARSET_INDEX | back to summary |
|---|---|
| private static final Integer WORST_CHARSET_INDEX | |
| CharsetComparator | back to summary |
|---|---|
| private CharsetComparator() | |
| compare | back to summary |
|---|---|
| public int compare(String charset1, String charset2) Implements java. Compares charsets. Returns a negative integer, zero, or a positive integer as the first charset is worse than, equal to, or better than the second. Charsets are ordered according to the following rules:
| |
| getEncoding | back to summary |
|---|---|
| pack-priv static String getEncoding(String charset) Returns encoding for the specified charset according to the following rules:
| |
selectBestTextFlavor. For
non-text flavors, unknown application MIME types are preferred, followed
by known application/x-java-* MIME types. Unknown application types are
preferred because if the user provides his own data flavor, it will
likely be the most descriptive one. For flavors which are otherwise
equal, the flavors' string representation are compared in the
alphabetical order.
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final Map | |
| private static final Map | |
| pack-priv static final DataFlavorUtil. | |
| private static final Map | |
| private static final Map | |
| private static final Map | |
| private static final Integer | |
| private static final Integer |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(DataFlavor flavor1, DataFlavor flavor2)
Implements java. Compares its two arguments for order. |
| decodedTextRepresentations | back to summary |
|---|---|
| private static final Map<Class<?>, Integer> decodedTextRepresentations | |
| encodedTextRepresentations | back to summary |
|---|---|
| private static final Map<Class<?>, Integer> encodedTextRepresentations | |
| exactTypes | back to summary |
|---|---|
| private static final Map<String, Integer> exactTypes | |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final DataFlavorUtil. | |
| nonTextRepresentations | back to summary |
|---|---|
| private static final Map<Class<?>, Integer> nonTextRepresentations | |
| primaryTypes | back to summary |
|---|---|
| private static final Map<String, Integer> primaryTypes | |
| textTypes | back to summary |
|---|---|
| private static final Map<String, Integer> textTypes | |
| UNKNOWN_OBJECT_LOSES | back to summary |
|---|---|
| private static final Integer UNKNOWN_OBJECT_LOSES | |
| UNKNOWN_OBJECT_WINS | back to summary |
|---|---|
| private static final Integer UNKNOWN_OBJECT_WINS | |
| DataFlavorComparator | back to summary |
|---|---|
| private DataFlavorComparator() | |
| compare | back to summary |
|---|---|
| public int compare(DataFlavor flavor1, DataFlavor flavor2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
DesktopDatatransferService used if
there is no desktop.
| Modifier and Type | Field and Description |
|---|---|
| private volatile FlavorMap | flavorMap
System singleton FlavorTable. |
| pack-priv static final DesktopDatatransferService |
| Access | Constructor and Description |
|---|---|
| private |
| flavorMap | back to summary |
|---|---|
| private volatile FlavorMap flavorMap System singleton FlavorTable. Only used if there is no desktop to provide an appropriate FlavorMap. | |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final DesktopDatatransferService INSTANCE | |
| DefaultDesktopDatatransferService | back to summary |
|---|---|
| private DefaultDesktopDatatransferService() | |
| getDefaultUnicodeEncoding | back to summary |
|---|---|
| public String getDefaultUnicodeEncoding() Implements sun. Doc from sun. Get a platform-dependent default unicode encoding to use in datatransfer system.
| |
| getDesktopService | back to summary |
|---|---|
| private static DesktopDatatransferService getDesktopService() | |
| getFlavorMap | back to summary |
|---|---|
| public FlavorMap getFlavorMap(Supplier<FlavorMap> supplier) Implements sun. Doc from sun. Takes an appropriate
| |
| getPlatformMappingsForFlavor | back to summary |
|---|---|
| public LinkedHashSet Implements sun. Doc from sun. Returns platform-specific mappings for the specified flavor. If there are
no platform-specific mappings for this flavor, the method returns an
empty
| |
| getPlatformMappingsForNative | back to summary |
|---|---|
| public LinkedHashSet Implements sun. Doc from sun. Returns platform-specific mappings for the specified native format. If
there are no platform-specific mappings for this native, the method
returns an empty
| |
| invokeOnEventThread | back to summary |
|---|---|
| public void invokeOnEventThread(Runnable r) Implements sun. Doc from sun. If desktop is present - invokes a
| |
| isDesktopPresent | back to summary |
|---|---|
| public boolean isDesktopPresent() Implements sun. Doc from sun. Checks if desktop is present.
| |
| registerTextFlavorProperties | back to summary |
|---|---|
| public void registerTextFlavorProperties(String nat, String charset, String eoln, String terminators) Implements sun. Doc from sun. This method is called for text flavor mappings established while parsing the default flavor mappings file. It stores the "eoln" and "terminators" parameters which are not officially part of the MIME type. They are MIME parameters specific to the flavormap.properties file format.
| |
If the specified boolean value is SELECT_BEST, the Comparator imposes the direct index-based order: an object A is greater than an object B if and only if the index of A is greater than the index of B. An object that doesn't have an associated index is less or equal than any other object.
If the specified boolean value is SELECT_WORST, the Comparator imposes the reverse index-based order: an object A is greater than an object B if and only if A is less than B with the direct index-based order.
| Modifier and Type | Field and Description |
|---|---|
| private static final Integer | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(Long obj1, Long obj2)
Implements java. Compares its two arguments for order. |
| FALLBACK_INDEX | back to summary |
|---|---|
| private static final Integer FALLBACK_INDEX | |
| indexMap | back to summary |
|---|---|
| private final Map<Long, Integer> indexMap | |
| IndexOrderComparator | back to summary |
|---|---|
| public IndexOrderComparator(Map<Long, Integer> indexMap) | |
| compare | back to summary |
|---|---|
| public int compare(Long obj1, Long obj2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
java.rmi.Remote and
java.rmi.MarshalledObject without creating a static dependency.
| Modifier and Type | Field and Description |
|---|---|
| private static final Constructor | |
| private static final Method | |
| private static final Class | |
| private static final Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Class | |
| private static Constructor | |
| public static Object | |
| private static Method | |
| public static boolean | |
| public static Object | newMarshalledObject(Object obj)
Returns a new MarshalledObject containing the serialized representation of the given object. |
| pack-priv static Class |
| marshallCtor | back to summary |
|---|---|
| private static final Constructor<?> marshallCtor | |
| marshallGet | back to summary |
|---|---|
| private static final Method marshallGet | |
| marshallObjectClass | back to summary |
|---|---|
| private static final Class<?> marshallObjectClass | |
| remoteClass | back to summary |
|---|---|
| private static final Class<?> remoteClass | |
| RMI | back to summary |
|---|---|
| public RMI() | |
| getClass | back to summary |
|---|---|
| private static Class | |
| getConstructor | back to summary |
|---|---|
| private static Constructor | |
| getMarshalledObject | back to summary |
|---|---|
| public static Object getMarshalledObject(Object obj) throws IOException, ClassNotFoundException Returns a new copy of the contained marshalled object. | |
| getMethod | back to summary |
|---|---|
| private static Method getMethod(Class<?> c, String name, Class<?>... types) | |
| isRemote | back to summary |
|---|---|
| public static boolean isRemote(Class<?> c) Returns | |
| newMarshalledObject | back to summary |
|---|---|
| public static Object newMarshalledObject(Object obj) throws IOException Returns a new MarshalledObject containing the serialized representation of the given object. | |
| remoteClass | back to summary |
|---|---|
| pack-priv static Class Returns | |
| Access | Constructor and Description |
|---|---|
| private |
| standardEncodings | back to summary |
|---|---|
| private static final SortedSet<String> standardEncodings | |
| StandardEncodingsHolder | back to summary |
|---|---|
| private StandardEncodingsHolder() | |
| load | back to summary |
|---|---|
| private static SortedSet | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final DataFlavorUtil. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: a negative integer, zero, or a positive integer as the first argument is worse, equal to, or better than the secondthe first flavor1, DataFlavor DataFlavor to be comparedthe second flavor2)DataFlavor to be comparedOverrides sun. Implements java. Compares two |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final DataFlavorUtil. Hides sun. | |
| TextFlavorComparator | back to summary |
|---|---|
| private TextFlavorComparator() | |
| compare | back to summary |
|---|---|
| public int compare(DataFlavor flavor1, DataFlavor flavor2) Overrides sun. Implements java. Compares two
| |