common/src/main/java/HTTPClient/BufferedInputStream.java
/**
     * @return the number of bytes available for reading without blocking
     * @exception IOException if the buffer is empty and the underlying stream has been
     *                        closed
     */
@return the number of bytes available for reading without blocking
@exception IOException if the buffer is empty and the underlying stream has been
closed
@return the number of bytes available for reading without blocking @exception IOException if the buffer is empty and the underlying stream has been closed
public int available() throws IOException
    {
	int avail = end - pos;  
	if (avail == 0)
	    return in.available();
	try
	    { avail += in.available(); }
	catch (IOException ignored)
	    { /* ignore this because we have something available */ }
	return avail;
    }
public int available ( ) throws IOException { int avail = end - pos ; if ( avail == 0 ) return in . available ( ) ; try { avail += in . available ( ) ; } catch ( IOException ignored ) { /* ignore this because we have something available */ } return avail ; }
@return the number of bytes available for reading without blocking
 @exception IOException if the buffer is empty and the underlying stream has been
                        closed
@return the number of bytes available for reading without blocking @exception IOException if the buffer is empty and the underlying stream has been closed