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

ByteArrayOutputStream should have a toString(Charset) method

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u45
    • Fix Version/s: tbd_major
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE REQUEST :
      UnsupportedEncodingException has a

       toString(String charsetName)

      method but no

       toString(Charset)

      method.

      JUSTIFICATION :
      Every class that provides a conversion from bytes to string should have a method that takes a Charset object as a parameter.

      Otherwise conversion between Charset and charset name has unnecessarily to be done, and UnsupportedEncodingException have to be handled where they could not occur.

      ACTUAL -
      The implementation is missing.

      CUSTOMER SUBMITTED WORKAROUND :
      See above.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joehw Joe Wang
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: