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

typo in description of writeUTF(String) method

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description



      Name: vpR10011 Date: 05/18/2001



      Specification of the interface javax.imageio.stream.ImageOutputStream and
      specification of the class javax.imageio.stream.ImageOutputStreamImpl say:

      "public void void writeUTF(String str) throws IOException


      Writes two bytes of length information to the output stream, followed by
      the Java modified UTF representation of every character in the string s.
                                                                     ^^^^^^^^
      If s is null, a NullPointerException is thrown. Each character in the string s
        ^^^ ^^^
      is converted to a group of one, two, or three bytes, depending

      on the value of the character.
      ...

      First, the total number of bytes needed to represent all the characters
      of s is calculated.
        ^^^
      ...
      Otherwise, this length is written to the output stream in exactly the manner
      of the writeShort method; after this, the one-, two-, or three-byte
      representation of each character in the string s is written.
                                              ^^^^^^^^
      ...
      Parameters:
          s - a String containing the value to be written.
          ^^^^^^^^^^^^
      Throws:
          NullPointerException - if s is null.
                                   ^^^
          UTFDataFormatError - if the UTF representation of s requires more than 65536 bytes.
                                                           ^^^
      ..."

      These specifications contain "str" parameter in the signature and parameter "s"
      in other cases.




      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            dricesunw Daniel Rice (Inactive)
            Reporter:
            verapsunw Verap Verap (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: