public long writeTo(final OutputStream out) throws IOException {
        int nc = numChunks();
        for (int i = 0; i < nc; i++) {
            out.write(getChunk(i));
        }
        return length;
    }
public long writeTo(final OutputStream out) throws IOException {
        int nc = numChunks();
        for (int i = 0; i < nc; i++) {
            out.write(getChunk(i));
        }
        return length;
    }
public long writeTo ( final OutputStream out ) throws IOException { int nc = numChunks ( ) ; for ( int i = 0 ; i < nc ; i ++ ) { out . write ( getChunk ( i ) ) ; } return length ; }
Writes the file's data to an OutputStream.

@param out the OutputStream
@return number of bytes written
@throws IOException if there are problems writing to {@code out}
Writes the file s data to an OutputStream .