public void putNextEntry(ExtZipEntry entry) throws IOException { entries.add(entry); entry.setOffset(written); // file header signature writeInt(LOCSIG); writeFileInfo(entry); writeBytes(entry.getName().getBytes("iso-8859-1")); writeExtraBytes(entry); }
public void putNextEntry(ExtZipEntry entry) throws IOException { entries.add(entry); entry.setOffset(written); // file header signature writeInt(LOCSIG); writeFileInfo(entry); writeBytes(entry.getName().getBytes("iso-8859-1")); writeExtraBytes(entry); }
protected void writeDirEntry(ExtZipEntry entry) throws IOException { writeInt(CENSIG); // writeBytes( new byte[] { 0x50, 0x4b, 0x01, 0x02 } // ); // directory signature writeShort(ZIP_VERSION); // version made by writeFileInfo(entry); writeShort(0x00); // file comment length 2 bytes writeShort(0x00); // disk number start (unused) 2 bytes writeShort(0x00); // internal file attributes (unsued) 2 bytes writeInt(0x00); // external file attributes (unused) 4 bytes writeInt(entry.getOffset()); // relative offset of local header 4 bytes writeBytes(entry.getName().getBytes("iso-8859-1")); writeExtraBytes(entry); }
protected void writeDirEntry(ExtZipEntry entry) throws IOException { writeInt(CENSIG); // writeBytes( new byte[] { 0x50, 0x4b, 0x01, 0x02 } // ); // directory signature writeShort(ZIP_VERSION); // version made by writeFileInfo(entry); writeShort(0x00); // file comment length 2 bytes writeShort(0x00); // disk number start (unused) 2 bytes writeShort(0x00); // internal file attributes (unsued) 2 bytes writeInt(0x00); // external file attributes (unused) 4 bytes writeInt(entry.getOffset()); // relative offset of local header 4 bytes writeBytes(entry.getName().getBytes("iso-8859-1")); writeExtraBytes(entry); }