Beispiel #1
0
 public boolean save(File file, String options) {
   PrintWriter writer = PApplet.createWriter(file);
   boolean result = write(writer);
   writer.flush();
   writer.close();
   return result;
 }
Beispiel #2
0
 /**
  * ** Encodes the specified DBRecordKyes into XML and writes it to ** a specified PrintWriter
  * ** @param out The PrintWriter ** @param dbrk The list of DBRecordKeys
  */
 public static void printXML(PrintWriter out, DBRecordKey... dbrk) {
   if (out != null) {
     out.write("<" + DBFactory.TAG_RecordKeys + ">\n");
     for (int i = 0; i < dbrk.length; i++) {
       dbrk[i].printXML(out, 4);
     }
     out.write("</" + DBFactory.TAG_RecordKeys + ">\n");
     out.flush();
   }
 }
Beispiel #3
0
 /**
  * ** Encodes this DBRecordKey into XML and writes it to a specified PrintWriter ** @param out The
  * PrintWriter ** @param indent The number of spaces to indent ** @param sequence Optional
  * sequence value ** @param soapXML True for SOAP XML
  */
 public void printXML(PrintWriter out, int indent, int sequence, boolean soapXML) {
   if (out != null) {
     out.write(this.toXML(null, indent, sequence, soapXML).toString());
     out.flush();
   }
 }
Beispiel #4
0
 // Sends this object and its kids to a Writer with an indent of 2 spaces,
 // including the declaration at the top so that the output will be valid XML.
 public boolean write(PrintWriter output) {
   output.print(format(2));
   output.flush();
   return true;
 }