|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packagejava.awt.datatransferas colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
A class which implements a mechanism to transfer data using cut/copy/paste operations. @see java.awt.Toolkit#getSystemClipboard @version 1.Class Clipboard, constructor Clipboard(String)12 0215 12/0203/0001 @author Amy Fowler
Creates a clipboard object. @see java.awt.Toolkit#getSystemClipboardClass Clipboard, Transferable getContents(Object)
Returns a transferable object representing the current contents of the clipboard. If the clipboard currently has no contents it returnsClass Clipboard, String getName()null. The parameter Object requestor is not currently used. The method throwsIllegalStateExceptionif the clipboard is currently unavailable. For example on some platforms the system clipboard is unavailable while it is accessed by another application. @param requestor the object requesting the clip data (not used) @return the current transferable object on the clipboard @throws IllegalStateException if the clipboard is currently unavailable @see java.awt.Toolkit#getSystemClipboard
Returns the name of this clipboard object. @see java.awt.Toolkit#getSystemClipboardClass Clipboard, void setContents(Transferable, ClipboardOwner)
Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. If there is an existing owner registered that owner is notified that it no longer holds ownership of the clipboard contents. The method throws IllegalStateException if the clipboard is currently unavailable. For example on some platforms the system clipboard is unavailable while it is accessed by another application. @param content the transferable object representing the clipboard content @param owner the object which owns the clipboard content @throws IllegalStateException if the clipboard is currently unavailable @see java.awt.Toolkit#getSystemClipboard
Defines the interface for classes that will provide data to a clipboard. @version 1.7 028 12/0203/0001 @author Amy Fowler
Each instance represents the opaque concept of a data format as would appear on a clipboard during drag and drop or in a file system.Class DataFlavor, constructor DataFlavor()@version 1.
DataFlavorobjects are constant and never change once instantiated.53 0267 12/0903/01 @author Blake Sullivan @author Laurence P. G. Cable @author Jeff Dunn
Constructs a newClass DataFlavor, constructor DataFlavor(Class, String)DataFlavor. This constructor is provided only for the purpose of supporting theExternalizableinterface. It is not intended for public (client) use. @since 1.2
Class DataFlavor, constructor DataFlavor(String)ConstructConstructs aDataFlavorthat represents a Java class.The returned
DataFlavorwill have the following characteristics:representationClass = representationClass mimeType = application/x-java-serialized-object@param representationClass the class used to transfer data in this flavor @param humanPresentableName the human-readable string used to identify this flavor.;Ifif this parameter isnullthen the value of the the MIME Content Type is used.
Class DataFlavor, constructor DataFlavor(String, String)ConstructConstructs aDataFlavorfrom aMime TypemimeTypestring. The string can specify a "class=" parameter to create a DataFlavorwith the desired representation class. If the string does not contain "class=" parameterjava.io.InputStreamis used as default. @param mimeType the string used to identify the MIME type for this flavor. If; if the class specified by "class=" parameter is not successfully loaded then anIllegalArgumentExceptionClassNotFoundExceptionis thrown.@exception ClassNotFoundException if the class is not loaded @exception IllegalArgumentException ifmimeTypeis invalid
Class DataFlavor, constructor DataFlavor(String, String, ClassLoader)ConstructConstructs aDataFlavorthat represents aMimeType.The returned
DataFlavorwill have the following characteristics:If the
mimeTypeis "application/x-java-serialized-object; class=<representation class>" the result is the same as callingnew DataFlavor(Class:forName(<representation class>).as above
otherwiseOtherwise:representationClass = InputStream mimeType = mimeType@param mimeType the string used to identify the MIME type for this flavor.;Ifif the themimeTypedoes not specify a "class=" parameter or if the class is not successfully loaded then anIllegalArgumentExceptionis thrown.@param humanPresentableName the human-readable string used to identify this flavor. If; if this parameter isnullthen the value of the the MIME Content Type is used.@exception IllegalArgumentException ifmimeTypeis invalid or if the class is not successfully loaded
Class DataFlavor, Object clone()ConstructConstructs aDataFlavorthat represents aMimeType.The returned
DataFlavorwill have the following characteristics:If the mimeType is "application/x-java-serialized-object; class=<representation class>" the result is the same as calling
new DataFlavor(Class:forName(<representation class>).as above
otherwiseOtherwise:representationClass = InputStream mimeType = mimeType@param mimeType the string used to identify the MIME type for this flavor @param humanPresentableName the human-readiblereadable string used to identify this flavor @param classLoader the class loader to use @exception ClassNotFoundException if the class is not loaded @exception IllegalArgumentException ifmimeTypeis invalid
Returns a clone of thisClass DataFlavor, boolean equals(DataFlavor)DataFlavor. @return a clone of thisDataFlavor
Tests aClass DataFlavor, boolean equals(Object)DataFlavorto thisDataFlavorfor equality. TwoDataFlavorsDataFlavors are considered equal if and only if their MIME primary type and subtype and representation class are equal. Additionally if the primary type is "text" the subtype denotes a text flavor which supports the charset parameter and the representation class is notjava.io.Readerjava.lang.Stringjava.nio.CharBufferor[Cthecharset parameter must also be equal. Ifeither DataFlavora charset isof primarynottypeexplicitly"text"specifiedbut no charset isfor one or bothspecifiedDataFlavors the platform defaultcharsetencoding is assumed. SeeselectBestTextFlavorfor a list of text flavors which support the charset parameter. @param that theDataFlavor.to compare withthis@returntrueifthethatDataFlavors represent exactlyis equivalent tothethisDataFlavor;samefalsetype.otherwise @see #selectBestTextFlavor
Class DataFlavor, boolean equals(String)If the objectTests an arbitraryisObjectan instanceto thisofDataFlavorfor equality. TwoDataFlavors are consideredrepresentationClassequal if and only if their MIME primary typewilland subtypebeand representation class arecomparedequal.ThisAdditionally if the primary type is "text" the subtype denotes a text flavor which supports the charset parameter and the representationmethod doesclass is notusejava.io.Readerequals(java.lang.String)java.nio.CharBufferor[Cthecharsetparameter must also bemethodequal. Ifso it doesa charset is notreturnexplicitly specified for one or boths the platform default encoding is assumed. SeetrueDataFlavorselectBestTextFlavorforthe objectsa list ofStringtexttypeflavors which support the charset parameter. @param that theObjectto compare withthis@returntrueifthethatobjects areis equivalentequalto thisDataFlavor;falseotherwise @see #selectBestTextFlavor
Class DataFlavor, String getHumanPresentableName()CompareCompares only themimeTypeagainst the passed inStringandrepresentationClassis not considered in the comparison. IfrepresentationClassneeds to be compared thenequals(new DataFlavor(s))may be used. @deprecated As inconsistent withhashCode()contract useisMimeTypeEqual(String)instead. @return true if the String (MimeType) is equal
Returns the human presentable name for the dataClass DataFlavor, String getMimeType()foramtformat that thisDataFlavorrepresents. This name would be localized for different countries. @return the human presentable name for the data format that thisDataFlavorrepresents
Returns the MIME type string for this DataFlavor. @return the MIME type string for this flavor
Class DataFlavor, String getParameter(String)Returns the human presentable name for thisClass DataFlavor, String getPrimaryType()DataFlavorifparamNameequals "humanPresentableName". Otherwise returns the MIME type value associated withparamName. @param paramName the parameter name requested @return the value of the name parameter ornullif there is no associated value @see MimeType#getParameter
Returns the primary MIME type for thisClass DataFlavor, Reader getReaderForText(Transferable)DataFlavor. @return the primary MIME type of thisDataFlavor
Gets aClass DataFlavor, Class getRepresentationClass()readerReader foranainput streamtext flavor decoded if necessary for the expected charset (encoding).This worksTheonly if thesupported representationclass ofclasses arethisjava.io.Readerflavorjava.lang.Stringisjava.nio.CharBuffer[Cjava.io.InputStream(orjava.nio.ByteBufferaandsubclass)[B.In case of representation class beingBecause text flavors which do
Readernot support theresult willcharset parameterbeare encoded in a non-standard format thisclassmethod should notitselfbe called for such flavors.@returnHowevera Readerin order toreadmaintain backward-compatibility if this method is called for such a flavor this method will treat thedataflavor@exceptionasIllegalArgumentException ifthough it supports therepresentation class is notcharset parameter and attemptjava.io.InputStreamtoordecodejavait accordingly.langSeeselectBestTextFlavorfor a list of text flavors which do not support the charset parameter.String@param transferable theTransferablewhose data will be requested in this flavor @return aReaderto read theTransferable's data @exception IllegalArgumentException if thecharset (characterrepresentationencoding)class is notsupported byone of theJDK.seven listed above @exception IllegalArgumentException if thetransferableTransferablehasnulldata.@exception NullPointerException if thetransferable argumentTransferableisnull@exception UnsupportedEncodingException if.thethis flavor's representation isjava.io.InputStreamjava.nio.ByteBufferor[Band this flavor's encoding is not supported by thisflavor.implementation of the Java platform @exception UnsupportedFlavorException if thetransferableTransferabledoes not support this flavor.@exception IOException if the data cannot be read because of an I/O error @see #selectBestTextFlavor @since 1.3
Returns theClass DataFlavor, String getSubType()Classwhich objects supporting thisDataFlavorwill return when thisDataFlavoris requested. @return theClasswhich objects supporting thisDataFlavorwill return when thisDataFlavoris requested
Returns the sub MIME type of thisClass DataFlavor, int hashCode()DataFlavor. @return the Sub MIME type of thisDataFlavor
Returns hash code for thisClass DataFlavor, boolean isFlavorJavaFileListType()DataFlavor. For two equalDataFlavorsDataFlavors hash codes are equal. For theStringthat matchesDataFlavor.equals(String)it is not guaranteed thatDataFlavor's hash code is equal to the hash code of theString. @return a hash code for thisDataFlavor
Returns true if theClass DataFlavor, boolean isFlavorRemoteObjectType()DataFlavorspecified represents a list of file objects. @return true ifflavortheDataFlavorspecified represents a List of File objects
Returns true if theClass DataFlavor, boolean isFlavorSerializedObjectType()DataFlavorspecified represents a remote object. @return true if theDataFlavorspecified represents a Remote Object
Returns true if theClass DataFlavor, boolean isMimeTypeEqual(DataFlavor)DataFlavorspecified represents a serialized object. @return true if theDataFlavorspecified represents a Serialized Object
Class DataFlavor, boolean isMimeTypeEqual(String)CompareCompares themimeTypeof twoDataFlavorobjects.noNo parameters are considered. @param dataFlavor theDataFlavorto be compared @return true if theMimeTypesMimeTypes are equal otherwise false
Returns whether the string representation of the MIME type passed in is equivalent to the MIME type of thisClass DataFlavor, boolean isMimeTypeSerializedObject()DataFlavor. Parameters are notincudedincluded in the comparison.The comparison may involve adding default attributes for some MIME types (such as adding charset=US-ASCII to text/plain MIME types that have no charset parameter specified).@param mimeType the string representation of the MIME type @return true if the string representation of the MIME type passed in is equivalent to the MIME type of thisDataFlavor; false otherwise.@throws NullPointerException if mimeType isnull
Class DataFlavor, boolean isRepresentationClassInputStream()doesDoes theDataFlavorrepresent a serialized object
Class DataFlavor, boolean isRepresentationClassRemote()doesDoes theDataFlavorrepresent ajava.io.InputStream
Returns true if the representation class isClass DataFlavor, boolean isRepresentationClassSerializable()Remote. @return true if the representation class isRemote
Returns true if the representation class can be serialized. @return true if the representation class can be serializedClass DataFlavor, boolean match(DataFlavor)
Tests aClass DataFlavor, String normalizeMimeType(String)DataFlavorto thisDataFlavorfor equality. TwoDataFlavorsDataFlavors are considered equal if andmatchonly if their MIME primarytypestype andsubtypessubtype and representationclassesclass areallequal. Additionally if the primary type is "text" the subtype denotes a text flavor which supports the charset parameter and the representation class isalsonotconsideredjava.io.ReaderIfjava.lang.Stringeitherjava.nio.CharBufferDataFlavororis[Coftheprimarycharsettypeparameter"text"must also bebutequal. Ifnoa charset is not explicitly specified for one or bothDataFlavors the platform defaultcharsetencoding is assumed. SeeselectBestTextFlavorfor a list of text flavors which support the charset parameter. @param that theDataFlavor.to compare withthis@returntrueifthatis equivalent to thisDataFlavor;falseotherwise @see #selectBestTextFlavor
Called for each MIME type string to give DataFlavor subtypes the opportunity to change how the normalization of MIME types is accomplished. One possible use would be to add default parameter/value pairs in cases where none are present in the MIME type string passed in. This method is never invoked by this implementation from 1.1 onwards. @deprecated
Class DataFlavor, String normalizeMimeTypeParameter(String, String)Called onClass DataFlavor, void readExternal(ObjectInput)DataFlavorfor every MIME Type parameter to allowDataFlavorsubclasses to handle special parameters like the text/plaincharsetparameters whose values are case insensitive. (MIME type parameter values are supposed to be case sensitive.This method is called for each parameter name/value pair and should return the normalized representation of the
parameterValue. This method is never invoked by this implementation from 1.1 onwards. @deprecated
Class DataFlavor, DataFlavor selectBestTextFlavor(DataFlavor[])restoreRestores thisDataFlavorfromana Serialized state.
Selects the best textClass DataFlavor, void setHumanPresentableName(String)DataFlavorfrom an array ofDataFlavors. OnlyDataFlavor.stringFlavorand equivalent flavors and flavors that have a primary MIME type of "text" are considered for selection.Flavors are first sorted by their MIME types in the following order:
- "text/sgml"
- "text/xml"
- "text/html"
- "text/rtf"
- "text/enriched"
- "text/richtext"
- "text/uri-list"
- "text/tab-separated-values"
- "text/t140"
- "text/rfc822-headers"
- "text/parityfec"
- "text/directory"
- "text/css"
- "text/calendar"
- "application/x-java-serialized-object"
- "text/plain"
- "text/<other>"
For example "text/sgml" will be selected over "text/html" and
DataFlavor.stringFlavorwill be chosen overDataFlavor.plainTextFlavor.If two or more flavors share the best MIME type in the array then that MIME type will be checked to see if it supports the charset parameter.
The following MIME types support or are treated as though they support the charset parameter:
The following MIME types do not support or are treated as though they do not support the charset parameter:
- "text/sgml"
- "text/xml"
- "text/html"
- "text/enriched"
- "text/richtext"
- "text/uri-list"
- "text/directory"
- "text/css"
- "text/calendar"
- "application/x-java-serialized-object"
- "text/plain"
For "text/<other>" MIME types the first time the JRE needs to determine whether the MIME type supports the charset parameter it will check whether the parameter is explicitly listed in an arbitrarily chosen
- "text/rtf"
- "text/tab-separated-values"
- "text/t140"
- "text/rfc822-headers"
- "text/parityfec"
DataFlavorwhich uses that MIME type. If so the JRE will assume from that point on that the MIME type supports the charset parameter and will not check again. If the parameter is not explicitly listed the JRE will assume from that point on that the MIME type does not support the charset parameter and will not check again. Because this check is performed on an arbitrarily chosenDataFlavordevelopers must ensure that allDataFlavors with a "text/<other>" MIME type specify the charset parameter if it is supported by that MIME type. Developers should never rely on the JRE to substitute the platform's default charset for a "text/<other>" DataFlavor. Failure to adhere to this restriction will lead to undefined behavior.If the best MIME type in the array does not support the charset parameter the flavors which share that MIME type will then be sorted by their representation classes in the following order:
java.io.InputStreamjava.nio.ByteBuffer[B<all others>.If two or more flavors share the best representation class or if no flavor has one of the three specified representations then one of those flavors will be chosen non-deterministically.
If the best MIME type in the array does support the charset parameter the flavors which share that MIME type will then be sorted by their representation classes in the following order:
java.io.Readerjava.lang.Stringjava.nio.CharBuffer[C<all others>.If two or more flavors share the best representation class and that representation is one of the four explicitly listed then one of those flavors will be chosen non-deterministically. If however no flavor has one of the four specified representations the flavors will then be sorted by their charsets. Unicode charsets such as "UTF-16" "UTF-8" "UTF-16BE" "UTF-16LE" and their aliases are considered best. After them the platform default charset and its aliases are selected. "US-ASCII" and its aliases are worst. All other charsets are chosen in alphabetical order but only charsets supported by this implementation of the Java platform will be considered.
If two or more flavors share the best charset the flavors will then again be sorted by their representation classes in the following order:
java.io.InputStreamjava.nio.ByteBuffer[B<all others>.If two or more flavors share the best representation class or if no flavor has one of the three specified representations then one of those flavors will be chosen non-deterministically. @param availableFlavors an array of available
@return the best (highest fidelity) flavorDataFlavorsin anaccordingencoding supported by the JDKto the rules specified above ornullifnoneavailableFlavorscanisbenullhas zero length or contains no text flavors @sincefound1.3
Sets the human presentable name for the data format that this DataFlavor represents. This name would be localized for different countries. @param humanPresentableName the new human presentable name
Class DataFlavor, String toString()String representation of thisClass DataFlavor, Class tryToLoadClass(String, ClassLoader)DataFlavorand its parameters. TheresultresultingStringcontains the name of theDataFlavorclass this flavor's MIME type and its representation class.andIf this flavorMimehas a primary MIME type ofthis"text" supports the charset parameter and hasFlavoran encoded representation the flavor's charset is also included. SeeselectBestTextFlavorfor a list of text flavors which support the charset parameter. @return string representation of thisDataFlavor@see #selectBestTextFlavor
Class DataFlavor, void writeExternal(ObjectOutput)triedTries to load a class from: the bootstrap loader the system loader the context loader (if one is present) and finally the loader specified. @param className the name of the class to be loaded @param fallback the fallback loader @throwsreturn the class loaded @exception ClassNotFoundException if class is not found
Class DataFlavor, DataFlavor javaFileListFlavorSerializeSerializes thisDataFlavor.
To transfer a list of files to/from Java (and the underlying platform) aClass DataFlavor, String javaJVMLocalObjectMimeTypeDataFlavorof this type/subtype and representation class ofjava.util.Listis used. Each element of the list is required/guaranteed to be of typejava.io.File.
Class DataFlavor, String javaRemoteObjectMimeTypetoTo transfer a reference to an arbitrary Java object reference that has no associated MIME Content-type across aTransferableinterface WITHIN THE SAME JVM aDataFlavorwith this type/subtype is used with arepresentationClassequal to the type of the class/interface being passed across theTransferble.The object reference returned from
Transferable.getTransferDatafor a()DataFlavorwith this MIME Content-Type is required to be aninstanceofinstance of the representation Class of theDataFlavor.
In order to pass a live link to a Remote object via a Drag and DropClass DataFlavor, String javaSerializedObjectMimeTypeACTION_LINKoperation a Mime Content Type of application/x-java-remote-object should be used where the representation class of theDataFlavorrepresents the type of theRemoteinterface to be transferred.
Class DataFlavor, DataFlavor plainTextFlavoraA MIME Content-Type of application/x-java-serialized-object represents a graph of Java object(s) that have been made persistent. The representation class associated with thisDataFlavoridentifies the Java type of an object returned as a reference from an invocationjava.awt.datatransfer.getTransferData.()
TheClass DataFlavor, DataFlavor stringFlavorDataFlavorrepresenting plain text withunicodeUnicode encoding where:representationClass = InputStream mimeType = "text/plain; charset=unicode"ThisDataFlavorhas been deprecated because (1) Its representation is an InputStream an 8-bit based representation while Unicode is a 16-bit character set; and (2) The charset "unicode" is not well-defined. "unicode" implies a particular platform's implementation of Unicode not a cross-platform implementation. @deprecated as of 1.3. UseDataFlavor.getReaderForText( Transferable)instead ofTransferable. getTransferData(DataFlavor.plainTextFlavor).
TheDataFlavorrepresenting a Java Unicode String class where:representationClass = java.lang.String mimeType = "application/x-java-serialized-object"
AClass FlavorMap, Map getFlavorsForNatives(String[])Thetwo-wayFlavorMapMapis an interfacebetweento"natives"a(Strings)map that mapswhich correspond to platformnative type names (strings) to-MIME type stringsspecfic data formats andalso their"flavors"associated(DataFlavors. This map is used by the)DnD systemwhich corerspond tomapplatformdata types-independenttoMIME typesto enable the transfer of objects between Java.and the platform via the platform DnD SystemFlavorMaps need not be symmetric but typically are.@see SystemFlavorMap@version 1.14 0216 12/0203/0001 @since 1.2
Class FlavorMap, Map getNativesForFlavors(DataFlavor[])mapReturnsnatives to corresponding flavors @param native TheaarrayMapofString nativethetypesspecifiedtoStringmapnatives toDataFlavorstheirorcorrespondingnullDataFlavor.@returnTheareturnedMapobject whichiscontains 0 or more entriesa modifiable copy of thiswithFlavorMap'skeysinternalofdata.type String and values of type DataFlavorClient code is free to modify thewhereMapthe DataFlavor valueswithout affecting thismappedobject.(if@paramany)nativesare thean array(platformofindependent)Stringstypes corresponding to their nativewhich will be the key(platformsetdependent)ofdata typethe returnednamesMap. Ifthe parameter isnullthen themap returned should beisthe complete mapspecified a mapping of allmappings between native names and theirStringcorresponding DataFlavorsnatives currently known tothe implementation at the time of the call. The MapthisreturnedFlavorMapis mutable andto their correspondingconsideredDataFlavorstowill beowned byreturned.the@returncallerathusjava.util.Mapallowingof"nesting"Stringof FlavorMapnatives toimplementations.DataFlavors
mapReturnsflavors to native data types names @param flavors TheaarrayMapofDataFlavors tothe specifiedmapDataFlavors tonative typestheir correspondingorStringnullnative.@returnTheareturnedMapobjectwhich contains between 0 or more entries with keys of typeisDataFlavor and valuesa modifiable copy oftypethisStringFlavorMap'swhereinternalthedata.String values mappedClient code is(iffreeany)toaremodify thenative (platformMapdependent)withoutdata typeaffecting thisnameobject.corresponding@paramto theflavors an(platformarrayindependent)ofDataFlavors(MimeType).whichIf the parameter is null thenwill be the key set of the returnedMap.returnedIfshouldnullbe the complete mapis specified a mapping of allmappings between DataFlavors and their corresponding nativeDataFlavorsnamescurrently known tothe implementation at the time of the call. ThethisMapFlavorMapreturned is mutableto their correspondingandStringconsidered tonatives will beowned byreturned.the@returncallerathusjava.util.Mapallowingof"nesting"DataFlavorsoftoFlavorMapStringimplementations.natives
AClass StringSelection, constructor StringSelection(String)Transferablewhich implements the capability required to transfer aString. ThisTransferableproperly supportsDataFlavor.stringFlavorand all equivalent flavors. Support forDataFlavor.plainTextFlavorand all equivalent flavors is deprecated. No otherDataFlavorsDataFlavors are supported. @see java.awt.datatransfer.DataFlavor.stringFlavor @see java.awt.datatransfer.DataFlavor.plainTextFlavor
Creates aClass StringSelection, Object getTransferData(DataFlavor)Transferablecapable of transferring the specifiedString.
Returns theClass StringSelection, DataFlavor[] getTransferDataFlavors()Transferable's data in the requestedDataFlavorif possible. If the desired flavor isDataFlavor.stringFlavoror an equivalent flavor theStringrepresenting the selection is returned. If the desired flavor is DataFlavor.plainTextFlavor or an equivalent flavor aReaderis returned. Note: The behavior of this method for DataFlavor.plainTextFlavor and equivalentDataFlavorsDataFlavors is inconsistent with the definition ofDataFlavor.plainTextFlavor. @param flavor the requested flavor for the data @return the data in the requested flavor as outlined above.@throws UnsupportedFlavorException if the requested data flavor is not equivalent to eitherDataFlavor.stringFlavororDataFlavor.plainTextFlavor.@throws IOException if an IOException occurs while retrieving the data. By default StringSelection never throws this exception but a subclass may. @throws NullPointerException if flavor isnull@see java.io.Reader
Returns an array of flavors in which thisClass StringSelection, boolean isDataFlavorSupported(DataFlavor)Transferablecan provide the data.DataFlavor.stringFlavoris properly supported. Support forDataFlavor.plainTextFlavoris deprecated. @return an array of length two whose elements areDataFlavor. stringFlavorandDataFlavor.plainTextFlavor.
Returns whether the requested flavor is supported by thisTransferable. @param flavor the requested flavor for the data @return true ifflavoris equal toDataFlavor.stringFlavororDataFlavor.plainTextFlavor; false ifflavoris not one of the above flavors @throws NullPointerException if flavor isnull
Class SystemFlavorMap, DataFlavor decodeDataFlavor(String)The SystemFlavorMap isan externallya configurable mapthat maps platform native typebetweennames"natives" (stringsStrings) which correspond toMIMEplatform-specifictype stringsdata formats andalso"flavors" (DataFlavors) whichtheir associatedcorrespond toDataFlavors.platform-independent MIME types. Thismapmapping is used by theDnDdatasystem to map platformtransfer subsystem to transfer datatypesbetweento MIME typesJava and nativetoapplications and between Java applications in separate VMs.enableIn thetransferSunof objects betweenreference implementation theJavadefault SystemFlavorMap is initialized by the filejre/lib/flavormap.propertiesand theplatform viacontents of theplatformURL referenced by the AWT propertyAWT.DnD.flavorMapFileURL. SeeSystemflavormap.propertiesfor details. @version 1.19 0227 12/0203/0001 @since 1.2
Decodes aClass SystemFlavorMap, String decodeJavaMIMEType(String)Stringnative for use as aDataFlavor. @param nat theStringto decode @return the decodedJavaDataFlavorMIMETypeorasnullaifDataFlavornat is not an encodedStringnative
Decodes aClass SystemFlavorMap, String encodeDataFlavor(DataFlavor)Stringnative for use as a Java MIME type. @param nat theStringto decode @return the decoded JavaMIMETypeMIME type ornullif nat is not an encodedStringstringnative
Class SystemFlavorMap, String encodeJavaMIMEType(String)@return encodeEncodes aJavaDataFlavorMIMETypefor use as aStringnative. The format of an encodedDataFlavoris implementation-dependent. The only restrictions are:MIME type
- The encoded representation is
nullif and only if the specifiedDataFlavorisnullor its MIME typeStringisnull.- The encoded representations for two non-
nullDataFlavors with non-nullMIME typeStrings are equal if and only if theStrings of theseDataFlavors are equal according toString.equals(Object).Sun's reference implementation of this method returns the MIME
typenameStringof the specifiedDataFlavorprefixed withJAVA_DATAFLAVOR:. @param flav theDataFlavorto encode @return the encodedStringornullif flav isnullor has anullMIME type
Class SystemFlavorMap, FlavorMap getDefaultFlavorMap()@return encodeEncodes aJava MIMETypeMIME type for use as aStringnative. The format of an encoded representation of a MIME type is implementation-dependent. The only restrictions are:
- The encoded representation is
nullif and only if the MIME typeStringisnull.- The encoded representations for two non-
nullMIME typeStrings are equal if and only if theseStrings are equal according toString.equals(Object).Sun's reference implementation of this method returns the
specified MIME typeStringprefixed withJAVA_DATAFLAVOR:. @param mimeType the MIME typenameto encode @return the encodedStringornullif mimeType isnull
Class SystemFlavorMap, Map getFlavorsForNatives(String[])getReturns the defaultsystemFlavorMapimplementationfor this thread's ClassLoader.
Class SystemFlavorMap, Map getNativesForFlavors(DataFlavor[])mapReturns aMapof the specifiedStringnatives to their most preferredDataFlavor. EachDataFlavorvalue will be the same as the firstDataFlavorin the List returned bygetFlavorsForNativefor the specified native.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
natives toDataFlavorwhose MIME type is a decoded version of the native. @param natives an array ofStrings which will be the key set of the returnedMap. Ifnullis specified a mapping of all supportedStringnatives to their most preferredDataFlavors will be returned. @return ajava.util.MapofStringcorrespondingDataFlavors @see #getFlavorsForNative @seeflavors#encodeJavaMIMEType
Class SystemFlavorMap, boolean isJavaMIMEType(String)mapReturnsflavorsaMapof the specifiedDataFlavors to their most preferredStringnative. Each native value will be the same as the first native in the List returned bygetNativesForFlavorfor the specified flavor.If a specified
DataFlavoris previously unknown to the data transfer subsystem then invoking this method will establish a mapping in both directions between the specifiedDataFlavorand an encoded version of its MIME type as its native. @param flavors an array ofDataFlavors which will be the key set of the returnedMap. Ifnullis specified a mapping of allDataFlavors known to the datatypestransfer subsystem to their most preferredStringnatives will be returned. @return ajava.util.MapofDataFlavors toStringnatives @see #getNativesForFlavor @seenames#encodeDataFlavor
@returnReturnsifwhether thenative typespecifiedstringStringis an encoded JavaMIMETypeMIME type. @param str theStringto test @returntrueif theStringis encoded;falseotherwise
Defines the interface for classes that can be used to provide data for a transfer operation. @version 1.Class Transferable, boolean isDataFlavorSupported(DataFlavor)8 0210 12/0203/0001 @author Amy Fowler
Returns whether or not the specified data flavor is supported for this object. @param flavor the requested flavor for the data @return boolean indicatingwjetherwhether or not the data flavor is supported
Signals that the requested data is not supported in this flavor. @see Transferable#getTransferData @version 1.Class UnsupportedFlavorException, constructor UnsupportedFlavorException(DataFlavor)12 0213 12/0903/01 @author Amy Fowler
Constructs an UnsupportedFlavorException. @param flavor the flavor object which caused the exception@throws NullPointerException if.flavor isMay benull.