You can try this “virtual int OutputStream::writeFromInputStream ( InputStream & source, int maxNumBytesToWrite)” and let juce do all the work for you.
Or If you want to read and write data selectively, you can use " setPosition (int64 pos)" or “int64 getPosition ()” to seek around and "int read (void *destBuffer, int maxBytesToRead) " to actually read the data to a buffer, contents of which you can transfer to another file.