Java InputStream Copy copyLarge(InputStream input, OutputStream output)

Here you can find the source of copyLarge(InputStream input, OutputStream output)

Description

copy Large

License

Apache License

Declaration

public static long copyLarge(InputStream input, OutputStream output) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class Main {
    public static long copyLarge(InputStream input, OutputStream output) throws IOException {
        byte[] buffer = new byte[4096];
        long count = 0L;
        int n = 0;
        while (-1 != (n = input.read(buffer))) {
            output.write(buffer, 0, n);//from   ww  w.j a  va2  s  . c o  m
            count += n;
        }
        return count;
    }
}

Related

  1. copyLarge(final InputStream input, final OutputStream output)
  2. copyLarge(final InputStream input, final OutputStream output)
  3. copyLarge(InputStream in, OutputStream out, byte[] buffer)
  4. copyLarge(InputStream input, File outputFile)
  5. copyLarge(InputStream input, OutputStream output)
  6. copyLarge(InputStream input, OutputStream output)
  7. copyLarge(InputStream input, OutputStream output)
  8. copyLarge(InputStream input, OutputStream output)
  9. copyLarge(InputStream input, OutputStream output)