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

BufferedReader.ready() returns false on EOS

XMLWordPrintable

    • generic
    • generic

      Name: gm110360 Date: 09/24/2001


      java version "1.3.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
      Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

      The BufferedReader.ready() method returns false when EOS is reached, which
      renders BufferedReader virtually useless for use with sockets as it's
      impossible to tell when the peer tries to close it. It's not stated in the
      class documentation what BufferedReader should return on EOS, but returning
      false doesn't make sense as a readln() will not block but return null. If there
      is a reason for having ready() return false when EOS is reached, please make it
      an option.
      (Review ID: 132222)
      ======================================================================

            Unassigned Unassigned
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: