本文整理了Java中java.util.zip.ZipInputStream.peekShort()
方法的一些代码示例,展示了ZipInputStream.peekShort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipInputStream.peekShort()
方法的具体详情如下:
包路径:java.util.zip.ZipInputStream
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!