Code example for ZipEntry

Methods: setCrcsetMethodsetSize

0
	 */ 
	public static void writeZipFileEntry(ZipOutputStream outputStream, String entryName, byte[] bytes) throws IOException {
		CRC32.reset();
		int byteArraySize = bytes.length;
		CRC32.update(bytes, 0, byteArraySize);
		ZipEntry entry = new ZipEntry(entryName);
		entry.setMethod(ZipEntry.DEFLATED);
		entry.setSize(byteArraySize);
		entry.setCrc(CRC32.getValue());
		outputStream.putNextEntry(entry);
		outputStream.write(bytes, 0, byteArraySize);
		outputStream.closeEntry();
	} 
 
	/* 
	 * We don't use getContentEncoding() on the URL connection, because it might 
	 * leave open streams behind. See 
	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=117890 
	 */ 
	public static char[] getURLContents(String docUrlValue) {