Package java.util.jar

Examples of java.util.jar.JarOutputStream.finish()


                        in.close();
                     }
                  }
               }
               jos.flush();
               jos.finish();
            }
            catch(IOException e)
            {
               // FIXME: How to handle this?
               log.warn(e.getMessage(), e);
View Full Code Here


    jstream.putNextEntry(ze);
    jstream.closeEntry();
    ze = new ZipEntry("lib/lib2.jar");
    jstream.putNextEntry(ze);
    jstream.closeEntry();
    jstream.finish();
    jstream.close();
    job.setJar(jobJarFile.toURI().toString());
  }

  /**
 
View Full Code Here

        jarStream.write( fileData );
        jarStream.closeEntry();
      }
    }
    finally {
      jarStream.finish();
    }
  }

}
View Full Code Here

                writeEntry(jos, entry, oldJar);
            }
        }
        updateObserver(observer, currentEntry, size);

        jos.finish();
    }

    protected void updateObserver (ProgressObserver observer,
                                   double currentSize, double size)
    {
View Full Code Here

  private void writeJarFile(File jarFile, Manifest mf) {
    try {
      JarOutputStream jos = null;
      try {
        jos = new JarOutputStream(new FileOutputStream(jarFile), mf);
        jos.finish();
      } finally {
        if (jos != null)
          jos.close();
      }
    } catch (IOException e) {
View Full Code Here

    jstream.putNextEntry(ze);
    jstream.closeEntry();
    ze = new ZipEntry("lib/lib2.jar");
    jstream.putNextEntry(ze);
    jstream.closeEntry();
    jstream.finish();
    jstream.close();
    jobConf.setJar(jobJarFile.toURI().toString());
  }

  /**
 
View Full Code Here

            }
        }
       
        // BUG am I supposed to call close or finish?
        // I don't think I want ot close the underlying stream
        jarOut.finish();
        jarOut.close();

    }

    /**
 
View Full Code Here

    jstream.putNextEntry(ze);
    jstream.closeEntry();
    ze = new ZipEntry("lib/lib2.jar");
    jstream.putNextEntry(ze);
    jstream.closeEntry();
    jstream.finish();
    jstream.close();
    jobConf.setJar(jobJarFile.toURI().toString());
  }

  /**
 
View Full Code Here

        jos.closeEntry();
        // Put su artifact
        for (int i = 0; i < suName.length; i++) {
            jos.putNextEntry(new ZipEntry(suName[i] + ".zip"));
            JarOutputStream jos2 = new JarOutputStream(jos, new Manifest());
            jos2.finish();
            jos2.flush();
            jos.closeEntry();
        }
        // Close jar
        jos.close();
View Full Code Here

    try {
      fstream = new FileOutputStream(jarFilename);
      jstream = new JarOutputStream(fstream);

      addClassFilesFromDir(new File(jarOutDir), jstream);
      jstream.finish();
    } finally {
      if (null != jstream) {
        try {
          jstream.close();
        } catch (IOException ioe) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.