Code example for ZipEntry

Methods: setSize

0
    ze.setSize(f.length());
    out.putNextEntry(ze);
    IOUtils.copy(new FileInputStream(f), out);
     
    f = new File("../src/test/resources/bundles/" + inputFolderName + "/META-INF/MANIFEST.MF");
    ze = new ZipEntry("META-INF/MANIFEST.MF");
    ze.setSize(f.length());
    out.putNextEntry(ze);
    IOUtils.copy(new FileInputStream(f), out);    
     
    out.close();
} 
   
  @AfterClass 
  public static void cleanup() 
  { 
    IOUtils.deleteRecursive(new File("bundleManifestTest/"));
  } 
 
  @Test
Experience pair programming with AI  Get Codota for Java