1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/emul/mini/src/main/java/org/apidesign/bck2brwsr/emul/zip/ZipConstants64.java Tue Feb 26 14:55:55 2013 +0100
1.3 @@ -0,0 +1,84 @@
1.4 +/*
1.5 + * Copyright (c) 1995, 1996, Oracle and/or its affiliates. All rights reserved.
1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1.7 + *
1.8 + * This code is free software; you can redistribute it and/or modify it
1.9 + * under the terms of the GNU General Public License version 2 only, as
1.10 + * published by the Free Software Foundation. Oracle designates this
1.11 + * particular file as subject to the "Classpath" exception as provided
1.12 + * by Oracle in the LICENSE file that accompanied this code.
1.13 + *
1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1.17 + * version 2 for more details (a copy is included in the LICENSE file that
1.18 + * accompanied this code).
1.19 + *
1.20 + * You should have received a copy of the GNU General Public License version
1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1.23 + *
1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1.25 + * or visit www.oracle.com if you need additional information or have any
1.26 + * questions.
1.27 + */
1.28 +
1.29 +package org.apidesign.bck2brwsr.emul.zip;
1.30 +
1.31 +/*
1.32 + * This class defines the constants that are used by the classes
1.33 + * which manipulate Zip64 files.
1.34 + */
1.35 +
1.36 +public class ZipConstants64 {
1.37 +
1.38 + /*
1.39 + * ZIP64 constants
1.40 + */
1.41 + static final long ZIP64_ENDSIG = 0x06064b50L; // "PK\006\006"
1.42 + static final long ZIP64_LOCSIG = 0x07064b50L; // "PK\006\007"
1.43 + static final int ZIP64_ENDHDR = 56; // ZIP64 end header size
1.44 + static final int ZIP64_LOCHDR = 20; // ZIP64 end loc header size
1.45 + static final int ZIP64_EXTHDR = 24; // EXT header size
1.46 + static final int ZIP64_EXTID = 0x0001; // Extra field Zip64 header ID
1.47 +
1.48 + static final int ZIP64_MAGICCOUNT = 0xFFFF;
1.49 + static final long ZIP64_MAGICVAL = 0xFFFFFFFFL;
1.50 +
1.51 + /*
1.52 + * Zip64 End of central directory (END) header field offsets
1.53 + */
1.54 + static final int ZIP64_ENDLEN = 4; // size of zip64 end of central dir
1.55 + static final int ZIP64_ENDVEM = 12; // version made by
1.56 + static final int ZIP64_ENDVER = 14; // version needed to extract
1.57 + static final int ZIP64_ENDNMD = 16; // number of this disk
1.58 + static final int ZIP64_ENDDSK = 20; // disk number of start
1.59 + static final int ZIP64_ENDTOD = 24; // total number of entries on this disk
1.60 + static final int ZIP64_ENDTOT = 32; // total number of entries
1.61 + static final int ZIP64_ENDSIZ = 40; // central directory size in bytes
1.62 + static final int ZIP64_ENDOFF = 48; // offset of first CEN header
1.63 + static final int ZIP64_ENDEXT = 56; // zip64 extensible data sector
1.64 +
1.65 + /*
1.66 + * Zip64 End of central directory locator field offsets
1.67 + */
1.68 + static final int ZIP64_LOCDSK = 4; // disk number start
1.69 + static final int ZIP64_LOCOFF = 8; // offset of zip64 end
1.70 + static final int ZIP64_LOCTOT = 16; // total number of disks
1.71 +
1.72 + /*
1.73 + * Zip64 Extra local (EXT) header field offsets
1.74 + */
1.75 + static final int ZIP64_EXTCRC = 4; // uncompressed file crc-32 value
1.76 + static final int ZIP64_EXTSIZ = 8; // compressed size, 8-byte
1.77 + static final int ZIP64_EXTLEN = 16; // uncompressed size, 8-byte
1.78 +
1.79 + /*
1.80 + * Language encoding flag EFS
1.81 + */
1.82 + static final int EFS = 0x800; // If this bit is set the filename and
1.83 + // comment fields for this file must be
1.84 + // encoded using UTF-8.
1.85 +
1.86 + private ZipConstants64() {}
1.87 +}