979899100101102103104105106107
in.close(); } } } jos.flush(); jos.finish(); } catch(IOException e) { // FIXME: How to handle this? log.warn(e.getMessage(), e);
254255256257258259260261262263264
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()); } /**
69707172737475767778
jarStream.write( fileData ); jarStream.closeEntry(); } } finally { jarStream.finish(); } } }
156157158159160161162163164165166
writeEntry(jos, entry, oldJar); } } updateObserver(observer, currentEntry, size); jos.finish(); } protected void updateObserver (ProgressObserver observer, double currentSize, double size) {
334335336337338339340341342343344
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) {
222223224225226227228229230231232
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()); } /**
949596979899100101102103104
} } // BUG am I supposed to call close or finish? // I don't think I want ot close the underlying stream jarOut.finish(); jarOut.close(); } /**
226227228229230231232233234235236
164165166167168169170171172173174
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();
321322323324325326327328329330331
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) {