/** * Writes this property list (key and element pairs) in this * <code>Properties</code> table to the output stream in a format suitable * for loading into a <code>Properties</code> table using the * <code>load</code> method. * The stream is written using the ISO 8859-1 character encoding. */ public synchronized void store(OutputStream os, String header) throws IOException { BufferedWriter w; w = new BufferedWriter(new OutputStreamWriter(os, PREFERENCE_ENCODING)); Map m = new HashMap(); enumerate(m); w.write("<preferences xmlns=\"http://xml.apache.org/batik/preferences\">\n"); Iterator it = m.keySet().iterator(); while (it.hasNext()) { String n = (String)it.next(); String v = (String)m.get(n); w.write("<property name=\"" + n + "\">"); try { w.write(DOMUtilities.contentToString(v, false)); } catch (IOException ex) { // unlikely to happen } w.write("</property>\n"); } w.write("</preferences>\n"); w.flush(); }
/** * Writes this property list (key and element pairs) in this * <code>Properties</code> table to the output stream in a format suitable * for loading into a <code>Properties</code> table using the * <code>load</code> method. * The stream is written using the ISO 8859-1 character encoding. */ public synchronized void store(OutputStream os, String header) throws IOException { BufferedWriter w; w = new BufferedWriter(new OutputStreamWriter(os, PREFERENCE_ENCODING)); Map m = new HashMap(); enumerate(m); w.write("<preferences xmlns=\"http://xml.apache.org/batik/preferences\">\n"); for (Object o : m.keySet()) { String n = (String) o; String v = (String) m.get(n); w.write("<property name=\"" + n + "\">"); try { w.write(DOMUtilities.contentToString(v, false)); } catch (IOException ex) { // unlikely to happen } w.write("</property>\n"); } w.write("</preferences>\n"); w.flush(); }
tagName = prefix + ':' + n.getLocalName(); w.write(tagName + " xmlns:" + prefix + "=\"" + contentToString(ns, isXML11) + '"'); m = m.declare(prefix, ns); } else { m = m.declare(prefix, ans); w.write(" xmlns:" + prefix + "=\"" + contentToString(ans, isXML11) + '"'); + contentToString(a.getNodeValue(), isXML11) + '"'); w.write(contentToString(n.getNodeValue(), isXML11)); break; case Node.CDATA_SECTION_NODE: {
tagName = prefix + ':' + n.getLocalName(); w.write(tagName + " xmlns:" + prefix + "=\"" + contentToString(ns, isXML11) + '"'); m = m.declare(prefix, ns); } else { m = m.declare(prefix, ans); w.write(" xmlns:" + prefix + "=\"" + contentToString(ans, isXML11) + '"'); + contentToString(a.getNodeValue(), isXML11) + '"'); w.write(contentToString(n.getNodeValue(), isXML11)); break; case Node.CDATA_SECTION_NODE: {
tagName = prefix + ':' + n.getLocalName(); w.write(tagName + " xmlns:" + prefix + "=\"" + contentToString(ns, isXML11) + '"'); m = m.declare(prefix, ns); } else { m = m.declare(prefix, ans); w.write(" xmlns:" + prefix + "=\"" + contentToString(ans, isXML11) + '"'); + contentToString(a.getNodeValue(), isXML11) + '"'); w.write(contentToString(n.getNodeValue(), isXML11)); break; case Node.CDATA_SECTION_NODE: {