class InputStreamExtensions extends Object
Extensions to Java's InputStream classes.
| Constructor and description |
|---|
InputStreamExtensions() |
| Type Params | Return Type | Name and description |
|---|---|---|
<I extends InputStream, T> |
static T |
markAndReset(I self, int readLimit, Closure<T> closure)Convenience method for calling InputStream.mark, executing the closure, and then calling InputStream.reset before returning. |
<T> |
static T |
withBufferedReader(InputStream self, Closure<T> closure)Wrap an input stream with a buffered reader and invoke the usual withReader method over it. |
<T> |
static T |
withBufferedStream(InputStream self, Closure<T> closure)Wrap an input stream with a buffered one and invoke the usual withStream method over it. |
Convenience method for calling InputStream.mark, executing the closure, and then calling InputStream.reset before returning. @return
Wrap an input stream with a buffered reader and invoke the usual
withReader method over it.
@return
Wrap an input stream with a buffered one and invoke the usual
withStream method over it.
@return