8024338: Constant fields introduced by JDK-4759491 fix in b94 are exposed as public fields in public API
To move the new constants out of ZipConstants.java Reviewed-by: martin
This commit is contained in:
parent
e49385792c
commit
c9b3da34f2
@ -68,21 +68,6 @@ interface ZipConstants {
|
|||||||
static final int EXTSIZ = 8; // compressed size
|
static final int EXTSIZ = 8; // compressed size
|
||||||
static final int EXTLEN = 12; // uncompressed size
|
static final int EXTLEN = 12; // uncompressed size
|
||||||
|
|
||||||
/*
|
|
||||||
* Extra field header ID
|
|
||||||
*/
|
|
||||||
static final int EXTID_ZIP64 = 0x0001; // Zip64
|
|
||||||
static final int EXTID_NTFS = 0x000a; // NTFS
|
|
||||||
static final int EXTID_UNIX = 0x000d; // UNIX
|
|
||||||
static final int EXTID_EXTT = 0x5455; // Info-ZIP Extended Timestamp
|
|
||||||
|
|
||||||
/*
|
|
||||||
* EXTT timestamp flags
|
|
||||||
*/
|
|
||||||
static final int EXTT_FLAG_LMT = 0x1; // LastModifiedTime
|
|
||||||
static final int EXTT_FLAG_LAT = 0x2; // LastAccessTime
|
|
||||||
static final int EXTT_FLAT_CT = 0x4; // CreationTime
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Central directory (CEN) header field offsets
|
* Central directory (CEN) header field offsets
|
||||||
*/
|
*/
|
||||||
|
@ -80,5 +80,26 @@ class ZipConstants64 {
|
|||||||
// comment fields for this file must be
|
// comment fields for this file must be
|
||||||
// encoded using UTF-8.
|
// encoded using UTF-8.
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Constants below are defined here (instead of in ZipConstants)
|
||||||
|
* to avoid being exposed as public fields of ZipFile, ZipEntry,
|
||||||
|
* ZipInputStream and ZipOutputstream.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extra field header ID
|
||||||
|
*/
|
||||||
|
static final int EXTID_ZIP64 = 0x0001; // Zip64
|
||||||
|
static final int EXTID_NTFS = 0x000a; // NTFS
|
||||||
|
static final int EXTID_UNIX = 0x000d; // UNIX
|
||||||
|
static final int EXTID_EXTT = 0x5455; // Info-ZIP Extended Timestamp
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXTT timestamp flags
|
||||||
|
*/
|
||||||
|
static final int EXTT_FLAG_LMT = 0x1; // LastModifiedTime
|
||||||
|
static final int EXTT_FLAG_LAT = 0x2; // LastAccessTime
|
||||||
|
static final int EXTT_FLAT_CT = 0x4; // CreationTime
|
||||||
|
|
||||||
private ZipConstants64() {}
|
private ZipConstants64() {}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,8 @@ import java.nio.file.attribute.FileTime;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import static java.util.zip.ZipConstants64.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to represent a ZIP file entry.
|
* This class is used to represent a ZIP file entry.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user