/** * Main function to output a manifest properly in UTF-8. * * @param manifest The manifest to output * @param out The output stream * @throws IOException when something fails */ public static void outputManifest(Manifest manifest, OutputStream out) throws IOException { writeEntry(out, "Manifest-Version", "1.0"); attributes(manifest.getMainAttributes(), out); out.write(EOL); TreeSet<String> keys = new TreeSet<>(); for (Object o : manifest.getEntries() .keySet()) keys.add(o.toString()); for (String key : keys) { writeEntry(out, "Name", key); attributes(manifest.getAttributes(key), out); out.write(EOL); } out.flush(); }
/** * Main function to output a manifest properly in UTF-8. * * @param manifest The manifest to output * @param out The output stream * @throws IOException when something fails */ public static void outputManifest(Manifest manifest, OutputStream out) throws IOException { writeEntry(out, "Manifest-Version", "1.0"); attributes(manifest.getMainAttributes(), out); out.write(EOL); TreeSet<String> keys = new TreeSet<>(); for (Object o : manifest.getEntries() .keySet()) keys.add(o.toString()); for (String key : keys) { writeEntry(out, "Name", key); attributes(manifest.getAttributes(key), out); out.write(EOL); } out.flush(); }
/** * Main function to output a manifest properly in UTF-8. * * @param manifest * The manifest to output * @param out * The output stream * @throws IOException * when something fails */ public static void outputManifest(Manifest manifest, OutputStream out) throws IOException { writeEntry(out, "Manifest-Version", "1.0"); attributes(manifest.getMainAttributes(), out); TreeSet<String> keys = new TreeSet<String>(); for (Object o : manifest.getEntries().keySet()) keys.add(o.toString()); for (String key : keys) { write(out, 0, "\r\n"); writeEntry(out, "Name", key); attributes(manifest.getAttributes(key), out); } out.flush(); }
/** * Main function to output a manifest properly in UTF-8. * * @param manifest * The manifest to output * @param out * The output stream * @throws IOException * when something fails */ public static void outputManifest(Manifest manifest, OutputStream out) throws IOException { writeEntry(out, "Manifest-Version", "1.0"); attributes(manifest.getMainAttributes(), out); TreeSet<String> keys = new TreeSet<String>(); for (Object o : manifest.getEntries().keySet()) keys.add(o.toString()); for (String key : keys) { write(out, 0, "\r\n"); writeEntry(out, "Name", key); attributes(manifest.getAttributes(key), out); } out.flush(); }
/** * Main function to output a manifest properly in UTF-8. * * @param manifest * The manifest to output * @param out * The output stream * @throws IOException * when something fails */ public static void outputManifest(Manifest manifest, OutputStream out) throws IOException { writeEntry(out, "Manifest-Version", "1.0"); attributes(manifest.getMainAttributes(), out); TreeSet<String> keys = new TreeSet<String>(); for (Object o : manifest.getEntries().keySet()) keys.add(o.toString()); for (String key : keys) { write(out, 0, "\r\n"); writeEntry(out, "Name", key); attributes(manifest.getAttributes(key), out); } out.flush(); }