Exemplo n.º 1
0
 @Override
 public final void writeXML(final IndentWriter stream) throws XMLWriteError {
   stream.println("<Action name=\"" + mActionName + "\">");
   stream.push();
   for (final ActiconFeature feature : mFeatureList) {
     feature.writeXML(stream);
     stream.endl();
   }
   stream.pop();
   stream.print("</Action>");
   stream.flush();
 }
Exemplo n.º 2
0
 @Override
 public final String toString() {
   // Create A Byte Array Stream
   final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
   // Initialize The Indent Writer
   final IndentWriter stream = new IndentWriter(buffer);
   try {
     // Write Object
     writeXML(stream);
   } catch (XMLWriteError exc) {
     // mLogger.failure(exc.toString());
   }
   // Cleanup Stream and Writer
   stream.flush();
   stream.close();
   // Return String Representation
   try {
     return buffer.toString("UTF-8");
   } catch (Exception exc) {
     return buffer.toString();
   }
 }