Code example for BufferedInputStream

Methods: available

0
     * @return the estimated number of bytes available 
     * @throws IOException if this stream is closed or an error occurs 
     */ 
    public synchronized int available() throws IOException 
    { 
        return bis.available();
    } 
 
    /** 
     * Sets a mark position in this stream. The parameter {@code readlimit} 
     * indicates how many bytes can be read before a mark is invalidated. 
     * Calling {@code reset()} will reposition the stream back to the marked 
     * position if {@code readlimit} has not been surpassed. The underlying 
     * buffer may be increased in size to allow {@code readlimit} number of 
     * bytes to be supported. 
     * 
     * @param readlimit 
     *            the number of bytes that can be read before the mark is 
     *            invalidated. 
     * @see #reset() 
     */