JDK-8130725 : ByteArrayOutputStream should have a toString(Charset) method
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 8u45
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2015-07-06
  • Updated: 2017-12-02
  • Resolved: 2017-12-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorResolved
Related Reports
Duplicate :  
Relates :  
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.