@Override public void write(OutputStream out) throws Exception { jar.write(out); }
@Override public void write(OutputStream out) throws Exception { try { jar.write(out); } catch (Exception e) { e.printStackTrace(); throw e; } }
@Override public void write(OutputStream out) throws Exception { try { jar.write(out); } catch (Exception e) { e.printStackTrace(); throw e; } }
@Override public void write(OutputStream out) throws Exception { try { jar.write(out); } catch (Exception e) { e.printStackTrace(); throw e; } }
/** * Convert a string to bytes with UTF-8 and then output in max 72 bytes * * @param out the output string * @param width the current width * @param s the string to output * @return the new width * @throws IOException when something fails */ private static int write(OutputStream out, int width, String s) throws IOException { byte[] bytes = s.getBytes(UTF_8); return write(out, width, bytes); }
/** * Convert a string to bytes with UTF-8 and then output in max 72 bytes * * @param out the output string * @param width the current width * @param s the string to output * @return the new width * @throws IOException when something fails */ private static int write(OutputStream out, int width, String s) throws IOException { byte[] bytes = s.getBytes(UTF_8); return write(out, width, bytes); }
public void write(String file) throws Exception { check(); write(new File(file)); }
public void write(String file) throws Exception { check(); write(new File(file)); }
public void write(String file) throws Exception { check(); write(new File(file)); }
private static File updateManifest( Jar newJar, File bundle, Manifest manifest ) throws Exception { verifyDestinationFileCanBeWritten( bundle ); newJar.setManifest( manifest ); newJar.write( bundle ); return bundle; }
public void write(File file) throws Exception { check(); try (OutputStream out = IO.outputStream(file)) { write(out); } catch (Exception t) { IO.delete(file); throw t; } file.setLastModified(lastModified); }
public void write(File file) throws Exception { check(); try (OutputStream out = IO.outputStream(file)) { write(out); } catch (Exception t) { IO.delete(file); throw t; } file.setLastModified(lastModified); }
private void save(Release releaser, Revision revision, Jar jar) throws Exception { String classifier = jar.getName(); // jar name is classifier String extension = "jar"; File tmp = File.createTempFile(classifier, extension); try { jar.write(tmp); releaser.add(revision.archive(extension, classifier), tmp); } finally { IO.delete(tmp); } }
private void save(Release releaser, Revision revision, Jar jar) throws Exception { String classifier = jar.getName(); // jar name is classifier String extension = "jar"; File tmp = File.createTempFile(classifier, extension); try { jar.write(tmp); releaser.add(revision.archive(extension, classifier), tmp); } finally { IO.delete(tmp); } }
private void populateJar(Analyzer analyzer, File outputFile) throws Exception { Jar jar = analyzer.getJar(); jar.setManifest(analyzer.calcManifest()); try { jar.write(outputFile); } finally { jar.close(); } }