@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(); } }
@Override public final void writeXML(final IndentWriter stream) throws XMLWriteError { stream.println( "<ActionObject " + "lower=\"" + mLower + "\" " + "upper=\"" + mUpper + "\" " + "name=\"" + mName + "\">"); stream.push(); for (final ActionFeature feature : mFeatureList) { feature.writeXML(stream); if (!feature.equals(mFeatureList.getLast())) { stream.endl(); } } stream.pop(); stream.print("</ActionObject>"); }
@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(); }