com.sun.jini.thread
Class StreamPlugThread
java.lang.Object
java.lang.Thread
com.sun.jini.thread.StreamPlugThread
- All Implemented Interfaces:
- Runnable
- public class StreamPlugThread
- extends Thread
StreamPlugThread
is a utility class that "plugs" two streams,
one input stream and one output stream, together by creating a thread that
repeatedly reads any data available from the input stream and writes it to
the output stream.
- Author:
- Sun Microsystems, Inc.
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
StreamPlugThread
public StreamPlugThread(InputStream in,
OutputStream out)
run
public void run()
plugTogether
public static void plugTogether(InputStream in,
OutputStream out)
plugTogether
public static void plugTogether(OutputStream out,
InputStream in)
userProg
public static Process userProg(String cmd)
throws IOException
- Throws:
IOException
main
public static void main(String[] args)
error
public static void error(String err)
Copyright 2007, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.