author | avstepan |
Thu, 06 Aug 2015 19:07:35 +0300 | |
changeset 32037 | ab4526f4ac10 |
parent 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
2438 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
19843
diff
changeset
|
2 |
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. |
2438 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2438 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2438 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2438 | 24 |
*/ |
25 |
||
26 |
package java.util.zip; |
|
27 |
||
28 |
/* |
|
29 |
* This class defines the constants that are used by the classes |
|
30 |
* which manipulate Zip64 files. |
|
31 |
*/ |
|
32 |
||
33 |
class ZipConstants64 { |
|
34 |
||
35 |
/* |
|
36 |
* ZIP64 constants |
|
37 |
*/ |
|
38 |
static final long ZIP64_ENDSIG = 0x06064b50L; // "PK\006\006" |
|
39 |
static final long ZIP64_LOCSIG = 0x07064b50L; // "PK\006\007" |
|
40 |
static final int ZIP64_ENDHDR = 56; // ZIP64 end header size |
|
41 |
static final int ZIP64_LOCHDR = 20; // ZIP64 end loc header size |
|
42 |
static final int ZIP64_EXTHDR = 24; // EXT header size |
|
43 |
static final int ZIP64_EXTID = 0x0001; // Extra field Zip64 header ID |
|
44 |
||
45 |
static final int ZIP64_MAGICCOUNT = 0xFFFF; |
|
46 |
static final long ZIP64_MAGICVAL = 0xFFFFFFFFL; |
|
47 |
||
48 |
/* |
|
49 |
* Zip64 End of central directory (END) header field offsets |
|
50 |
*/ |
|
51 |
static final int ZIP64_ENDLEN = 4; // size of zip64 end of central dir |
|
52 |
static final int ZIP64_ENDVEM = 12; // version made by |
|
53 |
static final int ZIP64_ENDVER = 14; // version needed to extract |
|
54 |
static final int ZIP64_ENDNMD = 16; // number of this disk |
|
55 |
static final int ZIP64_ENDDSK = 20; // disk number of start |
|
56 |
static final int ZIP64_ENDTOD = 24; // total number of entries on this disk |
|
57 |
static final int ZIP64_ENDTOT = 32; // total number of entries |
|
58 |
static final int ZIP64_ENDSIZ = 40; // central directory size in bytes |
|
59 |
static final int ZIP64_ENDOFF = 48; // offset of first CEN header |
|
60 |
static final int ZIP64_ENDEXT = 56; // zip64 extensible data sector |
|
61 |
||
62 |
/* |
|
63 |
* Zip64 End of central directory locator field offsets |
|
64 |
*/ |
|
65 |
static final int ZIP64_LOCDSK = 4; // disk number start |
|
66 |
static final int ZIP64_LOCOFF = 8; // offset of zip64 end |
|
67 |
static final int ZIP64_LOCTOT = 16; // total number of disks |
|
68 |
||
69 |
/* |
|
70 |
* Zip64 Extra local (EXT) header field offsets |
|
71 |
*/ |
|
72 |
static final int ZIP64_EXTCRC = 4; // uncompressed file crc-32 value |
|
73 |
static final int ZIP64_EXTSIZ = 8; // compressed size, 8-byte |
|
74 |
static final int ZIP64_EXTLEN = 16; // uncompressed size, 8-byte |
|
75 |
||
2592
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
76 |
/* |
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
77 |
* Language encoding flag EFS |
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
78 |
*/ |
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
79 |
static final int EFS = 0x800; // If this bit is set the filename and |
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
80 |
// comment fields for this file must be |
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
81 |
// encoded using UTF-8. |
ef26f663a2ba
4244499: ZipEntry() does not convert filenames from Unicode to platform
sherman
parents:
2438
diff
changeset
|
82 |
|
19843
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
83 |
/* |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
84 |
* Constants below are defined here (instead of in ZipConstants) |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
85 |
* to avoid being exposed as public fields of ZipFile, ZipEntry, |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
86 |
* ZipInputStream and ZipOutputstream. |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
87 |
*/ |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
88 |
|
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
89 |
/* |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
90 |
* Extra field header ID |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
91 |
*/ |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
92 |
static final int EXTID_ZIP64 = 0x0001; // Zip64 |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
93 |
static final int EXTID_NTFS = 0x000a; // NTFS |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
94 |
static final int EXTID_UNIX = 0x000d; // UNIX |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
95 |
static final int EXTID_EXTT = 0x5455; // Info-ZIP Extended Timestamp |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
96 |
|
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
97 |
/* |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
98 |
* EXTT timestamp flags |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
99 |
*/ |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
100 |
static final int EXTT_FLAG_LMT = 0x1; // LastModifiedTime |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
101 |
static final int EXTT_FLAG_LAT = 0x2; // LastAccessTime |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
102 |
static final int EXTT_FLAT_CT = 0x4; // CreationTime |
71c34227ccb1
8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
sherman
parents:
5506
diff
changeset
|
103 |
|
2438 | 104 |
private ZipConstants64() {} |
105 |
} |