Name: rmT116609 Date: 09/03/2003
A DESCRIPTION OF THE PROBLEM :
A constructor of java.io.PrintStream accepts an encoding parameter. The documentation for this constructor does not provide any information of where the encoding is used.
Also, it seems the encoding is used for converting string/int to bytes while writing. However, all the write functions do not mention about this encoding at all. In fact, the documentation for these functions say that the platform's encoding is used for converting string/int to bytes. According to me this is wrong, as these functions might be using the encoding specified by the user in the constructor.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1. The constructor documentation should be completed to specify how the "encoding" parameter is used.
2. All the write functions should mention that the string/int to bytes conversion uses the user-specified encoding when the PrintStream is created with an additional encoding parameter.
URL OF FAULTY DOCUMENTATION :
relative path - j2sdk1.4.2/docs/api/java/io/PrintStream.html
(Incident Review ID: 201636)
======================================================================
A DESCRIPTION OF THE PROBLEM :
A constructor of java.io.PrintStream accepts an encoding parameter. The documentation for this constructor does not provide any information of where the encoding is used.
Also, it seems the encoding is used for converting string/int to bytes while writing. However, all the write functions do not mention about this encoding at all. In fact, the documentation for these functions say that the platform's encoding is used for converting string/int to bytes. According to me this is wrong, as these functions might be using the encoding specified by the user in the constructor.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1. The constructor documentation should be completed to specify how the "encoding" parameter is used.
2. All the write functions should mention that the string/int to bytes conversion uses the user-specified encoding when the PrintStream is created with an additional encoding parameter.
URL OF FAULTY DOCUMENTATION :
relative path - j2sdk1.4.2/docs/api/java/io/PrintStream.html
(Incident Review ID: 201636)
======================================================================
- relates to
-
JDK-4833833 (spec) PrintWriter incorrectly describes character conversion
-
- Open
-
-
JDK-8254653 PrintStream and PrintWriter platform encoding mention is incorrect
-
- Open
-