Code example for InputStream

Methods: available

0
    static int getReadLimit(InputStream in)
        throws IOException 
    { 
        if (in instanceof ByteArrayInputStream)
        { 
            return in.available();
        } 
 
        return Integer.MAX_VALUE;
    } 
}