Transfers elements from an input stream to an output stream, doing so continuously until the input stream reads 0 elements or an error occurs. The streams are not closed after transfer completes.
The input stream to read from.
The output stream to write to.
The maximum number of elements to transfer. Defaults to an empty optional, meaning unlimited elements.
The result of the transfer operation.
See Implementation
Transfers elements from an input stream to an output stream, doing so continuously until the input stream reads 0 elements or an error occurs. The streams are not closed after transfer completes.