When someone on a
Java forum asks about "how you're doing something" it's almost *always* a request for code, or at the *very* least, pseudo-code. Copying a file should use essentially zero memory unless you're doing it wrong. Read into a buffer, write the buffer out, repeat until done. No memory other than the buffer is being used.
Personally, I almost always just use something from commons-io, but it does the exact same thing.
So again, without knowing what you're doing, it's impossible to know what you might be doing wrong.