Java Utililty Methods OutputStream Write

List of utility methods to do OutputStream Write

Description

The list of methods to do OutputStream Write are organized into topic(s).

Method

voidwriteStreamToStream(InputStream input, OutputStream output)
Send all bytes from the input stream to the output stream.
byte[] buffer = new byte[4096];
while (true) {
    int len = input.read(buffer);
    if (len == -1) {
        break;
    output.write(buffer, 0, len);
voidwriteStreamToStream(InputStream inputStream, OutputStream outputStream)
write Stream To Stream
BufferedInputStream bis = new BufferedInputStream(inputStream);
BufferedOutputStream bos = new BufferedOutputStream(outputStream);
try {
    int i = 0;
    while ((i = bis.read()) != -1) {
        bos.write(i);
} finally {
...