/** Builds a mock zip file according to specifications */
public void createZip(File file, int leadingBytes, boolean trailingByte, boolean extraLoc, boolean useExt, boolean useZip64) throws IOException {
FileChannel ch = getChannel(file, false);
try {
ch.position(leadingBytes);
int locPos = leadingBytes + (extraLoc ? (LOCLEN + (useExt ? EXTLEN : 0)) : 0);
int cenPos = locPos + LOCLEN + (useExt ? EXTLEN : 0);
int endPos = cenPos + CENLEN;
if (extraLoc) {
addLocFile(ch, leadingBytes, useExt);