Class Streams
java.lang.Object
xyz.apollosoftware.bibliothiki.compression.utils.Streams
Utility methods for working with streams.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longpipeNBytes(@NonNull InputStream input, @NonNull OutputStream output, long n) Pipe n bytes from the givenInputStreamto the givenOutputStream.
-
Method Details
-
pipeNBytes
Pipe n bytes from the givenInputStreamto the givenOutputStream.If n is less than or equal to zero, this method immediately returns zero.
- Parameters:
input- The input stream to read bytes from.output- The output stream to write bytes to.n- The number of bytes to pipe.- Returns:
- The number of bytes that were piped.
-