java.util.zip.ZipInputStream.peekShort()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中java.util.zip.ZipInputStream.peekShort()方法的一些代码示例,展示了ZipInputStream.peekShort()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipInputStream.peekShort()方法的具体详情如下:
包路径:java.util.zip.ZipInputStream
类名称:ZipInputStream
方法名:peekShort

ZipInputStream.peekShort介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: ibinti/bugvm

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: MobiVM/robovm

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: FlexoVM/flexovm

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: com.gluonhq/robovm-rt

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: com.jtransc/jtransc-rt

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, true)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

代码示例来源:origin: com.bugvm/bugvm-rt

int version = peekShort(0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
  throw new ZipException("Cannot read local header version " + version);
int flags = peekShort(LOCFLG - LOCVER);
if ((flags & ZipFile.GPBF_UNSUPPORTED_MASK) != 0) {
  throw new ZipException("Invalid General Purpose Bit Flag: " + flags);
int ceLastModifiedTime = peekShort(LOCTIM - LOCVER);
int ceLastModifiedDate = peekShort(LOCTIM - LOCVER + 2);
int ceCompressionMethod = peekShort(LOCHOW - LOCVER);
long ceCrc = 0, ceCompressedSize = 0, ceSize = -1;
if (!hasDD) {
  ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.LITTLE_ENDIAN)) & 0xffffffffL;
int nameLength = peekShort(LOCNAM - LOCVER);
if (nameLength == 0) {
  throw new ZipException("Entry is not named");
int extraLength = peekShort(LOCEXT - LOCVER);

相关文章