-
public final class InputStreamExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static StringreadTextAndClose(InputStream $self, Charset charset)final static LongcopyTo(InputStream $self, OutputStream out, Integer bufferSize, Function0<Boolean> shouldCancel)Copies this stream to the given output stream, returning the number of bytes copied. -
-
Method Detail
-
readTextAndClose
final static String readTextAndClose(InputStream $self, Charset charset)
-
copyTo
final static Long copyTo(InputStream $self, OutputStream out, Integer bufferSize, Function0<Boolean> shouldCancel)
Copies this stream to the given output stream, returning the number of bytes copied.
Note It is the caller's responsibility to close both of these resources.
- Parameters:
out- The output stream to copy tobufferSize- The buffer size to use.shouldCancel- Check to indicate if the stream should be cancelled
-
-
-
-