< prev index next >

test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package jdk.testlibrary;
  25 
  26 import java.io.ByteArrayOutputStream;
  27 import java.util.concurrent.CancellationException;
  28 import java.util.concurrent.ExecutionException;
  29 import java.util.concurrent.Future;
  30 
  31 /**
  32  * @deprecated This class is deprecated. Use the one from
  33  *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
  34  */
  35 @Deprecated
  36 class OutputBuffer {
  37     private static class OutputBufferException extends RuntimeException {
  38         private static final long serialVersionUID = 8528687792643129571L;
  39 
  40         public OutputBufferException(Throwable cause) {
  41             super(cause);
  42         }
  43     }
  44 
  45     private final Process p;
  46     private final Future<Void> outTask;
  47     private final Future<Void> errTask;
  48     private final ByteArrayOutputStream stderrBuffer = new ByteArrayOutputStream();
  49     private final ByteArrayOutputStream stdoutBuffer = new ByteArrayOutputStream();
  50 
  51     /**
  52      * Create an OutputBuffer, a class for storing and managing stdout and
  53      * stderr results separately




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package jdk.testlibrary;
  25 
  26 import java.io.ByteArrayOutputStream;
  27 import java.util.concurrent.CancellationException;
  28 import java.util.concurrent.ExecutionException;
  29 import java.util.concurrent.Future;
  30 
  31 /**
  32  * @deprecated This class is deprecated. Use the one from
  33  *             {@code <root>/test/lib/jdk/test/lib/process}
  34  */
  35 @Deprecated
  36 class OutputBuffer {
  37     private static class OutputBufferException extends RuntimeException {
  38         private static final long serialVersionUID = 8528687792643129571L;
  39 
  40         public OutputBufferException(Throwable cause) {
  41             super(cause);
  42         }
  43     }
  44 
  45     private final Process p;
  46     private final Future<Void> outTask;
  47     private final Future<Void> errTask;
  48     private final ByteArrayOutputStream stderrBuffer = new ByteArrayOutputStream();
  49     private final ByteArrayOutputStream stdoutBuffer = new ByteArrayOutputStream();
  50 
  51     /**
  52      * Create an OutputBuffer, a class for storing and managing stdout and
  53      * stderr results separately


< prev index next >