package com.robinson.file; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; /** * @author Sean Robinson * @version v. */ public class SendFile { public static void copy(InputStream in, OutputStream out, int buffersize) throws IOException { byte[] buffer = new byte[buffersize]; int read; while((read=in.read(buffer))!=-1){ out.write(buffer,0,read); } in.close(); out.close(); return; } }