public int available() throws IOException {
  ensureOpen();
  if (reachEOF) {
    return 0;
  }
 else {
    return 1;
  }
}

public int available ( ) throws IOException { ensureOpen ( ) ; if ( reachEOF ) { return 0 ; } else { return 1 ; } }
returns 0 after eof has been reached , otherwise always return 1 . < p > programs should not count on this method to return the actual number of bytes that could be read without blocking .
