(str) Provide fast de/encoding for String

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: core-libs
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
        To class String add:
          public String(byte[] bytes, CharsetDecoder decoder);
          public byte[] String.getBytes(CharsetEncoder encoder);


      JUSTIFICATION :
      Currently, the existing API for String de/encoding is only via Charset, or charset name. Internally always a lookup/instantiation of the concerning de/encoder is required. On de/encoding short strings this has a appreciable effect on it's performance. this could be avoided, if externally cached CharsetDe/Encoder object could be passed.
      See discussion:
      http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-May/006842.html

            Assignee:
            Unassigned
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: