< prev index next >

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

Print this page
rev 53081 : 8213031: (zipfs) Add support for POSIX file permissions
Reviewed-by: simonis


 213     static final long EXTLEN(byte[] b) { return LG(b, 12);} // uncompressed size
 214 
 215     // end of central directory header (END) fields
 216     static final int  ENDSUB(byte[] b) { return SH(b, 8); }  // number of entries on this disk
 217     static final int  ENDTOT(byte[] b) { return SH(b, 10);}  // total number of entries
 218     static final long ENDSIZ(byte[] b) { return LG(b, 12);}  // central directory size
 219     static final long ENDOFF(byte[] b) { return LG(b, 16);}  // central directory offset
 220     static final int  ENDCOM(byte[] b) { return SH(b, 20);}  // size of zip file comment
 221     static final int  ENDCOM(byte[] b, int off) { return SH(b, off + 20);}
 222 
 223     // zip64 end of central directory recoder fields
 224     static final long ZIP64_ENDTOD(byte[] b) { return LL(b, 24);}  // total number of entries on disk
 225     static final long ZIP64_ENDTOT(byte[] b) { return LL(b, 32);}  // total number of entries
 226     static final long ZIP64_ENDSIZ(byte[] b) { return LL(b, 40);}  // central directory size
 227     static final long ZIP64_ENDOFF(byte[] b) { return LL(b, 48);}  // central directory offset
 228     static final long ZIP64_LOCOFF(byte[] b) { return LL(b, 8);}   // zip64 end offset
 229 
 230     // central directory header (CEN) fields
 231     static final long CENSIG(byte[] b, int pos) { return LG(b, pos + 0); }
 232     static final int  CENVEM(byte[] b, int pos) { return SH(b, pos + 4); }

 233     static final int  CENVER(byte[] b, int pos) { return SH(b, pos + 6); }
 234     static final int  CENFLG(byte[] b, int pos) { return SH(b, pos + 8); }
 235     static final int  CENHOW(byte[] b, int pos) { return SH(b, pos + 10);}
 236     static final long CENTIM(byte[] b, int pos) { return LG(b, pos + 12);}
 237     static final long CENCRC(byte[] b, int pos) { return LG(b, pos + 16);}
 238     static final long CENSIZ(byte[] b, int pos) { return LG(b, pos + 20);}
 239     static final long CENLEN(byte[] b, int pos) { return LG(b, pos + 24);}
 240     static final int  CENNAM(byte[] b, int pos) { return SH(b, pos + 28);}
 241     static final int  CENEXT(byte[] b, int pos) { return SH(b, pos + 30);}
 242     static final int  CENCOM(byte[] b, int pos) { return SH(b, pos + 32);}
 243     static final int  CENDSK(byte[] b, int pos) { return SH(b, pos + 34);}
 244     static final int  CENATT(byte[] b, int pos) { return SH(b, pos + 36);}
 245     static final long CENATX(byte[] b, int pos) { return LG(b, pos + 38);}

 246     static final long CENOFF(byte[] b, int pos) { return LG(b, pos + 42);}
 247 
 248     /* The END header is followed by a variable length comment of size < 64k. */
 249     static final long END_MAXLEN = 0xFFFF + ENDHDR;
 250     static final int READBLOCKSZ = 128;
 251 }


 213     static final long EXTLEN(byte[] b) { return LG(b, 12);} // uncompressed size
 214 
 215     // end of central directory header (END) fields
 216     static final int  ENDSUB(byte[] b) { return SH(b, 8); }  // number of entries on this disk
 217     static final int  ENDTOT(byte[] b) { return SH(b, 10);}  // total number of entries
 218     static final long ENDSIZ(byte[] b) { return LG(b, 12);}  // central directory size
 219     static final long ENDOFF(byte[] b) { return LG(b, 16);}  // central directory offset
 220     static final int  ENDCOM(byte[] b) { return SH(b, 20);}  // size of zip file comment
 221     static final int  ENDCOM(byte[] b, int off) { return SH(b, off + 20);}
 222 
 223     // zip64 end of central directory recoder fields
 224     static final long ZIP64_ENDTOD(byte[] b) { return LL(b, 24);}  // total number of entries on disk
 225     static final long ZIP64_ENDTOT(byte[] b) { return LL(b, 32);}  // total number of entries
 226     static final long ZIP64_ENDSIZ(byte[] b) { return LL(b, 40);}  // central directory size
 227     static final long ZIP64_ENDOFF(byte[] b) { return LL(b, 48);}  // central directory offset
 228     static final long ZIP64_LOCOFF(byte[] b) { return LL(b, 8);}   // zip64 end offset
 229 
 230     // central directory header (CEN) fields
 231     static final long CENSIG(byte[] b, int pos) { return LG(b, pos + 0); }
 232     static final int  CENVEM(byte[] b, int pos) { return SH(b, pos + 4); }
 233     static final int  CENVEM_FA(byte[] b, int pos) { return CH(b, pos + 5); }
 234     static final int  CENVER(byte[] b, int pos) { return SH(b, pos + 6); }
 235     static final int  CENFLG(byte[] b, int pos) { return SH(b, pos + 8); }
 236     static final int  CENHOW(byte[] b, int pos) { return SH(b, pos + 10);}
 237     static final long CENTIM(byte[] b, int pos) { return LG(b, pos + 12);}
 238     static final long CENCRC(byte[] b, int pos) { return LG(b, pos + 16);}
 239     static final long CENSIZ(byte[] b, int pos) { return LG(b, pos + 20);}
 240     static final long CENLEN(byte[] b, int pos) { return LG(b, pos + 24);}
 241     static final int  CENNAM(byte[] b, int pos) { return SH(b, pos + 28);}
 242     static final int  CENEXT(byte[] b, int pos) { return SH(b, pos + 30);}
 243     static final int  CENCOM(byte[] b, int pos) { return SH(b, pos + 32);}
 244     static final int  CENDSK(byte[] b, int pos) { return SH(b, pos + 34);}
 245     static final int  CENATT(byte[] b, int pos) { return SH(b, pos + 36);}
 246     static final long CENATX(byte[] b, int pos) { return LG(b, pos + 38);}
 247     static final int  CENATX_PERMS(byte[] b, int pos) { return SH(b, pos + 40);}
 248     static final long CENOFF(byte[] b, int pos) { return LG(b, pos + 42);}
 249 
 250     /* The END header is followed by a variable length comment of size < 64k. */
 251     static final long END_MAXLEN = 0xFFFF + ENDHDR;
 252     static final int READBLOCKSZ = 128;
 253 }
< prev index next >