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

(str) Provide fast de/encoding for String

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 7
    • 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

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

              Created:
              Updated:
              Imported:
              Indexed: