Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4394752

typo in java.awt.datatransfer.DataFlavor doc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 1.4.0
    • 1.4.0
    • docs
    • beta
    • sparc
    • solaris_2.5.1

    Description



      Name: sdR10048 Date: 12/04/2000


      The doc for java.awt.datatransfer.DataFlavor says:

      public static final DataFlavor selectBestTextFlavor(DataFlavor[] availableFlavors)

           Selects the best text DataFlavor from an array of DataFlavors. Only
           DataFlavor.stringFlavor, and equivalent flavors, and flavors that
           have a primary MIME type of "text", are considered for selection. If
           the array contains stringFlavor , or an equivalent flavor (a
           serialized java.lang.String ), then this flavor is selected. Flavors
           having "text" as their primary MIME type are sorted by their
           secondary MIME type in the following order: "plain", "calendar",
           "css", "directory", "rfc822-header", "tab-separated-values",
           "uri-list", "richtext", "enriched", "rtf", "html", "xml", "sgml". For
           example, "text/sgml" will be selected over "text/html", and
           "text/enriched" will be selected over "text/richtext". If there are
           two or more text flavors with the best MIME subtype in the array,
           their charsets are compared. Unicode charsets, such as "UTF-16",
           "UTF-8", "UTF-16BE" and "UTF-16LE", are considered best. After them,
           platform default charset is selected. "US-ASCII" is worst. All other
           charsets are chosen in alphabetical order.
           Parameters:
               availableFlavors - an array of available DataFlavors
           Returns:
               the best (highest fidelity) flavor in an encoding supported by
               this implementation of the Java platform, or null if none can be
               found.

      And there is a typo in the list of the secondary MIME types:

      ..."plain", "calendar", "css", "directory", "rfc822-header",
                                                   ^^^^^^^^^^^^^
      "tab-separated-values", "uri-list", "richtext", "enriched", "rtf",
      "html", "xml", "sgml".

      String "rfc822-header" should be replaced with "rfc822-headers".
      ------------------------------------------------------------
      ======================================================================

      Attachments

        Activity

          People

            sharonz Sharon Zakhour (Inactive)
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: