JarEntry entry = new JarEntry( entryName );
entry.setMethod( ZipEntry.DEFLATED );
CRC32 checksumCalculator= new CRC32();
ByteStreamCache bsc = new ByteStreamCache();
entry.setSize( StreamUtil.copyStream( is, bsc.getOutputStream() ));
checksumCalculator.update( bsc.toByteArray() );
entry.setCrc(checksumCalculator.getValue());
jarOS.putNextEntry( entry );
//Now that we have the correct size, we can copy it to the jar stream
StreamUtil.copyStream( bsc.getInputStream(), jarOS );
entriesSet.add( entryName );
}