< prev index next >

src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipConstants.java

Print this page
8203328: Rename EFS in java.util.zip internals to something meaningful
Reviewed-by: sherman


  26 package jdk.nio.zipfs;
  27 
  28 /**
  29  *
  30  * @author Xueming Shen
  31  */
  32 
  33 class ZipConstants {
  34     /*
  35      * Compression methods
  36      */
  37     static final int METHOD_STORED     = 0;
  38     static final int METHOD_DEFLATED   = 8;
  39     static final int METHOD_DEFLATED64 = 9;
  40     static final int METHOD_BZIP2      = 12;
  41     static final int METHOD_LZMA       = 14;
  42     static final int METHOD_LZ77       = 19;
  43     static final int METHOD_AES        = 99;
  44 
  45     /*
  46      * General purpose big flag
  47      */
  48     static final int FLAG_ENCRYPTED  = 0x01;
  49     static final int FLAG_DATADESCR  = 0x08;    // crc, size and csize in dd
  50     static final int FLAG_EFS        = 0x800;   // If this bit is set the filename and
  51                                                 // comment fields for this file must be
  52                                                 // encoded using UTF-8.
  53     /*
  54      * Header signatures
  55      */
  56     static long LOCSIG = 0x04034b50L;   // "PK\003\004"
  57     static long EXTSIG = 0x08074b50L;   // "PK\007\008"
  58     static long CENSIG = 0x02014b50L;   // "PK\001\002"
  59     static long ENDSIG = 0x06054b50L;   // "PK\005\006"
  60 
  61     /*
  62      * Header sizes in bytes (including signatures)
  63      */
  64     static final int LOCHDR = 30;       // LOC header size
  65     static final int EXTHDR = 16;       // EXT header size
  66     static final int CENHDR = 46;       // CEN header size
  67     static final int ENDHDR = 22;       // END header size
  68 
  69     /*
  70      * Local file (LOC) header field offsets




  26 package jdk.nio.zipfs;
  27 
  28 /**
  29  *
  30  * @author Xueming Shen
  31  */
  32 
  33 class ZipConstants {
  34     /*
  35      * Compression methods
  36      */
  37     static final int METHOD_STORED     = 0;
  38     static final int METHOD_DEFLATED   = 8;
  39     static final int METHOD_DEFLATED64 = 9;
  40     static final int METHOD_BZIP2      = 12;
  41     static final int METHOD_LZMA       = 14;
  42     static final int METHOD_LZ77       = 19;
  43     static final int METHOD_AES        = 99;
  44 
  45     /*
  46      * General purpose bit flag
  47      */
  48     static final int FLAG_ENCRYPTED  = 0x01;
  49     static final int FLAG_DATADESCR  = 0x08;    // crc, size and csize in dd
  50     static final int FLAG_USE_UTF8   = 0x800;   // If this bit is set the filename and
  51                                                 // comment fields for this file must be
  52                                                 // encoded using UTF-8.
  53     /*
  54      * Header signatures
  55      */
  56     static long LOCSIG = 0x04034b50L;   // "PK\003\004"
  57     static long EXTSIG = 0x08074b50L;   // "PK\007\008"
  58     static long CENSIG = 0x02014b50L;   // "PK\001\002"
  59     static long ENDSIG = 0x06054b50L;   // "PK\005\006"
  60 
  61     /*
  62      * Header sizes in bytes (including signatures)
  63      */
  64     static final int LOCHDR = 30;       // LOC header size
  65     static final int EXTHDR = 16;       // EXT header size
  66     static final int CENHDR = 46;       // CEN header size
  67     static final int ENDHDR = 22;       // END header size
  68 
  69     /*
  70      * Local file (LOC) header field offsets


< prev index next >