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

(spec) PrintStream does not document use of charset consistently

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 1.4.2
    • core-libs
    • Fix Understood
    • x86
    • windows_2000

      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)
      ======================================================================

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: