The normal way to copy a file from an input stream to an output stream looks like this:
byte[] data = new byte[4096];
int count;
// open input and output streams
while ((count = in.read(data)) != -1) {
out.write(data, 0, count);
}
// close input and output streams
Under all normal circumstances that code will not be a bottleneck - any slow-down will be from whatever I/O is being done. Just ensure you use buffered input/output streams.