看看这句话:
int java.io.InputStream.available()available
public int available()
              throws IOException
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or or another thread. 
The available method for class InputStream always returns 0. This method should be overridden by subclasses. 
Returns:
the number of bytes that can be read from this input stream without blocking. 
Throws: 
IOException - if an I/O error occurs.