Support for "data:" URL scheme

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P5
    • None
    • Affects Version/s: 7
    • Component/s: core-libs
    • x86
    • linux

      A DESCRIPTION OF THE REQUEST :
      "The data: URI scheme defined in IETF standard RFC 2397, is an URI scheme that allows inclusion of small data items inline, as if they were being referenced to as an external resource. They tend to be far simpler than alternative inclusion methods, such as MIME with cid: or mid:. According to the wording in the RFC, data: URIs are in fact URLs, although they do not actually locate anything." - from http://en.wikipedia.org/wiki/Data:_URL

      JUSTIFICATION :
      It would be useful for providing data to objects that only take URLs as arguments. For example, the URLClassLoader can only use URLs. But using the data: URL it would be possible for the URLClassLoader to load classes from a byte array.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      the data: URL fully supported just like the http: or jar: urls.
      ACTUAL -
      the data: URL is not supported.

      ---------- BEGIN SOURCE ----------
              URL url = new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==");

      ---------- END SOURCE ----------

            Assignee:
            Chris Hegarty
            Reporter:
            Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: