src/java.base/share/classes/java/net/SocketInputStream.java
changeset 52104 331fbd2db6b5
parent 49249 92cca24c8807
child 52209 3b2e68c9e7a6
equal deleted inserted replaced
52103:4acfd9b6c2f9 52104:331fbd2db6b5
   230     /**
   230     /**
   231      * Returns the number of bytes that can be read without blocking.
   231      * Returns the number of bytes that can be read without blocking.
   232      * @return the number of immediately available bytes
   232      * @return the number of immediately available bytes
   233      */
   233      */
   234     public int available() throws IOException {
   234     public int available() throws IOException {
   235         return impl.available();
   235         if (eof) {
       
   236             return 0;
       
   237         } else {
       
   238             return impl.available();
       
   239         }
   236     }
   240     }
   237 
   241 
   238     /**
   242     /**
   239      * Closes the stream.
   243      * Closes the stream.
   240      */
   244      */