Class OutputCapture


  • public class OutputCapture
    extends java.lang.Object
    Captures the output of a java main() method, wraps it in a CDATA marked section, and outputs it. This class is designed to be used from its main() method.
    Since:
    17 Aug 2005
    Author:
    Mark Taylor
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Writes CDATA-wrapped output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Writes CDATA-wrapped output. First element of args is the name of a class, subsequent elements are arguments to be passed to the main method of that class. Blank lines are stripped and a blank is prepended to each line.
        Parameters:
        args - argument vector
        Throws:
        java.lang.Exception