question: private void zipEntry ( ZipOutputStream zipOutputStream , ResourceNode resourceNode ) { try ( ByteArrayInputStream inputStream = new ByteArrayInputStream ( ( byte [ ] ) resourceNode . getObject ( ) ) ) { ZipEntry zipEntry = new ZipEntry ( createNewZipEntryName ( resourceNode . getPath ( ) ) ) ; zipOutputStream . putNextEntry ( zipEntry ) ; byte [ ] b = new byte [ DATA_BLOCK_SIZE ] ; int byteCount ; while ( ( byteCount = inputStream . read ( b , 0 , DATA_BLOCK_SIZE ) ) != - 1 ) { zipOutputStream . write ( b , 0 , byteCount ) ; } zipOutputStream . closeEntry ( ) ; inputStream . close ( ) ; } catch ( Exception e ) { log . error ( "Error while writing zip entry '" + resourceNode . getNodeName ( ) + "'." , e ) ; } }
target:  Zips the given ResourceNode.