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

Need a load(Reader)/store(Writer) interface for Properties class

    Details

    • Subcomponent:
    • Resolved In Build:
      b81
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp
    • Verification:
      Verified

      Description

      Name: dgC58589 Date: 11/24/97


      Original title: StringBufferInputStream is deprecated, without suitable replacement

      java.io.StringBufferInputStream
      has been deprecated. However, I cannot find anything
      to replace its full functionality.

      Specifically, java.util.Properties.load() expects
      an InputStream. I want it to read from a String.
      StringBufferInputStream was previously the
      perfect way to do this.
      Unfortunately, the recommended replacement is
      java.io.StringReader, which is subclassed from
      Reader, and is NOT usable as an InputStream.

      The ideal fix would be to make Reader
      implement InputStream.

      A lesser fix, would be to document in the
      deprecation notes for StringBufferInputStream,
      what to do if you really need an InputStream
      derived from a String

      InputStreamReader seems to go from InputStream to
      Reader. Now you need something to go from
      Reader to InputStream
      (Review ID: 20734)
      ======================================================================
      A suggested fix from (company - Self , email - ###@###.###)
      is attached to this report as filename 593432.txt (too large to paste here.)
      There is a suggested fix from ###@###.### (see Comments).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sherman Xueming Shen
                Reporter:
                dgrahamcsunw David Graham-cumming (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: