本文整理了Java中java.util.zip.ZipOutputStream.writeShort()
方法的一些代码示例,展示了ZipOutputStream.writeShort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipOutputStream.writeShort()
方法的具体详情如下:
包路径:java.util.zip.ZipOutputStream
类名称:ZipOutputStream
方法名:writeShort
暂无
代码示例来源:origin: robovm/robovm
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: robovm/robovm
writeShort(cDir, ZIP_VERSION_2_0); // Version this file was made by.
writeShort(cDir, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(cDir, flags);
writeShort(cDir, currentEntry.getMethod());
writeShort(cDir, currentEntry.time);
writeShort(cDir, currentEntry.modDate);
writeLong(cDir, crc.getValue());
if (currentEntry.getMethod() == DEFLATED) {
writeLong(cDir, crc.tbytes);
curOffset += writeShort(cDir, nameLength);
if (currentEntry.extra != null) {
curOffset += writeShort(cDir, currentEntry.extra.length);
} else {
writeShort(cDir, 0);
commentBytes = comment.getBytes(StandardCharsets.UTF_8);
writeShort(cDir, commentBytes.length); // Comment length.
writeShort(cDir, 0); // Disk Start
writeShort(cDir, 0); // Internal File Attributes
writeLong(cDir, 0); // External File Attributes
writeLong(cDir, offset);
代码示例来源:origin: robovm/robovm
writeShort(out, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(out, flags);
writeShort(out, method);
if (currentEntry.getTime() == -1) {
currentEntry.setTime(System.currentTimeMillis());
writeShort(out, currentEntry.time);
writeShort(out, currentEntry.modDate);
writeLong(out, 0);
writeShort(out, nameLength);
if (currentEntry.extra != null) {
writeShort(out, currentEntry.extra.length);
} else {
writeShort(out, 0);
代码示例来源:origin: MobiVM/robovm
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: ibinti/bugvm
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: com.gluonhq/robovm-rt
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: com.jtransc/jtransc-rt
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: com.bugvm/bugvm-rt
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: FlexoVM/flexovm
writeShort(cDir, 0); // Disk Number
writeShort(cDir, 0); // Start Disk
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, entries.size()); // Number of entries
writeShort(cDir, commentBytes.length);
if (commentBytes.length > 0) {
cDir.write(commentBytes);
代码示例来源:origin: MobiVM/robovm
writeShort(cDir, ZIP_VERSION_2_0); // Version this file was made by.
writeShort(cDir, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(cDir, flags);
writeShort(cDir, currentEntry.getMethod());
writeShort(cDir, currentEntry.time);
writeShort(cDir, currentEntry.modDate);
writeLong(cDir, crc.getValue());
if (currentEntry.getMethod() == DEFLATED) {
writeLong(cDir, crc.tbytes);
curOffset += writeShort(cDir, nameLength);
if (currentEntry.extra != null) {
curOffset += writeShort(cDir, currentEntry.extra.length);
} else {
writeShort(cDir, 0);
commentBytes = comment.getBytes(StandardCharsets.UTF_8);
writeShort(cDir, commentBytes.length); // Comment length.
writeShort(cDir, 0); // Disk Start
writeShort(cDir, 0); // Internal File Attributes
writeLong(cDir, 0); // External File Attributes
writeLong(cDir, offset);
代码示例来源:origin: ibinti/bugvm
writeShort(out, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(out, flags);
writeShort(out, method);
if (currentEntry.getTime() == -1) {
currentEntry.setTime(System.currentTimeMillis());
writeShort(out, currentEntry.time);
writeShort(out, currentEntry.modDate);
writeLong(out, 0);
writeShort(out, nameLength);
if (currentEntry.extra != null) {
writeShort(out, currentEntry.extra.length);
} else {
writeShort(out, 0);
代码示例来源:origin: ibinti/bugvm
writeShort(cDir, ZIP_VERSION_2_0); // Version this file was made by.
writeShort(cDir, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(cDir, flags);
writeShort(cDir, currentEntry.getMethod());
writeShort(cDir, currentEntry.time);
writeShort(cDir, currentEntry.modDate);
writeLong(cDir, crc.getValue());
if (currentEntry.getMethod() == DEFLATED) {
writeLong(cDir, crc.tbytes);
curOffset += writeShort(cDir, nameLength);
if (currentEntry.extra != null) {
curOffset += writeShort(cDir, currentEntry.extra.length);
} else {
writeShort(cDir, 0);
commentBytes = comment.getBytes(StandardCharsets.UTF_8);
writeShort(cDir, commentBytes.length); // Comment length.
writeShort(cDir, 0); // Disk Start
writeShort(cDir, 0); // Internal File Attributes
writeLong(cDir, 0); // External File Attributes
writeLong(cDir, offset);
代码示例来源:origin: MobiVM/robovm
writeShort(out, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(out, flags);
writeShort(out, method);
if (currentEntry.getTime() == -1) {
currentEntry.setTime(System.currentTimeMillis());
writeShort(out, currentEntry.time);
writeShort(out, currentEntry.modDate);
writeLong(out, 0);
writeShort(out, nameLength);
if (currentEntry.extra != null) {
writeShort(out, currentEntry.extra.length);
} else {
writeShort(out, 0);
代码示例来源:origin: com.bugvm/bugvm-rt
writeShort(cDir, ZIP_VERSION_2_0); // Version this file was made by.
writeShort(cDir, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(cDir, flags);
writeShort(cDir, currentEntry.getMethod());
writeShort(cDir, currentEntry.time);
writeShort(cDir, currentEntry.modDate);
writeLong(cDir, crc.getValue());
if (currentEntry.getMethod() == DEFLATED) {
writeLong(cDir, crc.tbytes);
curOffset += writeShort(cDir, nameLength);
if (currentEntry.extra != null) {
curOffset += writeShort(cDir, currentEntry.extra.length);
} else {
writeShort(cDir, 0);
commentBytes = comment.getBytes(StandardCharsets.UTF_8);
writeShort(cDir, commentBytes.length); // Comment length.
writeShort(cDir, 0); // Disk Start
writeShort(cDir, 0); // Internal File Attributes
writeLong(cDir, 0); // External File Attributes
writeLong(cDir, offset);
代码示例来源:origin: com.gluonhq/robovm-rt
writeShort(cDir, ZIP_VERSION_2_0); // Version this file was made by.
writeShort(cDir, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(cDir, flags);
writeShort(cDir, currentEntry.getMethod());
writeShort(cDir, currentEntry.time);
writeShort(cDir, currentEntry.modDate);
writeLong(cDir, crc.getValue());
if (currentEntry.getMethod() == DEFLATED) {
writeLong(cDir, crc.tbytes);
curOffset += writeShort(cDir, nameLength);
if (currentEntry.extra != null) {
curOffset += writeShort(cDir, currentEntry.extra.length);
} else {
writeShort(cDir, 0);
commentBytes = comment.getBytes(StandardCharsets.UTF_8);
writeShort(cDir, commentBytes.length); // Comment length.
writeShort(cDir, 0); // Disk Start
writeShort(cDir, 0); // Internal File Attributes
writeLong(cDir, 0); // External File Attributes
writeLong(cDir, offset);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
writeShort(cDir, ZIP_VERSION_2_0); // Version this file was made by.
writeShort(cDir, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(cDir, flags);
writeShort(cDir, currentEntry.getMethod());
writeShort(cDir, currentEntry.time);
writeShort(cDir, currentEntry.modDate);
writeLong(cDir, crc.getValue());
if (currentEntry.getMethod() == DEFLATED) {
writeLong(cDir, crc.tbytes);
curOffset += writeShort(cDir, nameLength);
if (currentEntry.extra != null) {
curOffset += writeShort(cDir, currentEntry.extra.length);
} else {
writeShort(cDir, 0);
commentBytes = comment.getBytes(StandardCharsets.UTF_8);
writeShort(cDir, commentBytes.length); // Comment length.
writeShort(cDir, 0); // Disk Start
writeShort(cDir, 0); // Internal File Attributes
writeLong(cDir, 0); // External File Attributes
writeLong(cDir, offset);
代码示例来源:origin: com.bugvm/bugvm-rt
writeShort(out, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(out, flags);
writeShort(out, method);
if (currentEntry.getTime() == -1) {
currentEntry.setTime(System.currentTimeMillis());
writeShort(out, currentEntry.time);
writeShort(out, currentEntry.modDate);
writeLong(out, 0);
writeShort(out, nameLength);
if (currentEntry.extra != null) {
writeShort(out, currentEntry.extra.length);
} else {
writeShort(out, 0);
代码示例来源:origin: com.gluonhq/robovm-rt
writeShort(out, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(out, flags);
writeShort(out, method);
if (currentEntry.getTime() == -1) {
currentEntry.setTime(System.currentTimeMillis());
writeShort(out, currentEntry.time);
writeShort(out, currentEntry.modDate);
writeLong(out, 0);
writeShort(out, nameLength);
if (currentEntry.extra != null) {
writeShort(out, currentEntry.extra.length);
} else {
writeShort(out, 0);
代码示例来源:origin: com.jtransc/jtransc-rt
writeShort(out, ZIP_VERSION_2_0); // Minimum version needed to extract.
writeShort(out, flags);
writeShort(out, method);
if (currentEntry.getTime() == -1) {
currentEntry.setTime(System.currentTimeMillis());
writeShort(out, currentEntry.time);
writeShort(out, currentEntry.modDate);
writeLong(out, 0);
writeShort(out, nameLength);
if (currentEntry.extra != null) {
writeShort(out, currentEntry.extra.length);
} else {
writeShort(out, 0);
内容来源于网络,如有侵权,请联系作者删除!