public static ConstrainableInputStream wrap ( InputStream in , int bufferSize , int maxSize ) { return in instanceof ConstrainableInputStream ? ( ConstrainableInputStream ) in : new ConstrainableInputStream ( in , bufferSize , maxSize ) ; }
If this InputStream is not already a ConstrainableInputStream let it be one .