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);
  }
}

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 ) ; } }
zips the given resourcenode .
