Class java.lang.Process
All Packages Class Hierarchy This Package Previous Next Index
Class java.lang.Process
Object
|
+----java.lang.Process
- public abstract class Process
- extends Object
The exec
methods return an
instance of a subclass of Process
that can be used to
control the process and obtain information about it.
The subprocess is not killed when there are no more references to
the Process
object, but rather the subprocess
continues executing asynchronously.
- Version:
- 1.11, 07/01/98
- Author:
- unascribed
- Since:
- JDK1.0
- See Also:
- exec(java.lang.String), exec(java.lang.String, java.lang.String[]), exec(java.lang.String[]), exec(java.lang.String[], java.lang.String[])
-
java.lang.Process()
-
-
destroy()
- Kills the subprocess.
-
exitValue()
- Returns the exit value for the subprocess.
-
getErrorStream()
- Gets the error stream of the subprocess.
-
getInputStream()
-
Gets the input stream of the subprocess.
-
getOutputStream()
- Gets the output stream of the subprocess.
-
waitFor()
- Waits for the subprocess to complete.
Process
public Process()
destroy
public abstract void destroy()
- Kills the subprocess.
- Since:
- JDK1.0
exitValue
public abstract int exitValue()
- Returns the exit value for the subprocess.
- Returns:
- the exit value of the subprocess.
- Throws: IllegalThreadStateException
- if the subprocess has not yet
terminated.
- Since:
- JDK1.0
getErrorStream
public abstract java.io.InputStream getErrorStream()
- Gets the error stream of the subprocess.
This stream is usually unbuffered.
- Returns:
- the input stream connected to the error stream of the
subprocess.
- Since:
- JDK1.0
getInputStream
public abstract java.io.InputStream getInputStream()
- Gets the input stream of the subprocess.
This stream is usually buffered.
- Returns:
- the input stream connected to the normal output of the
subprocess.
- Since:
- JDK1.0
getOutputStream
public abstract java.io.OutputStream getOutputStream()
- Gets the output stream of the subprocess.
This stream is usually buffered.
- Returns:
- the output stream connected to the normal input of the
subprocess.
- Since:
- JDK1.0
waitFor
public abstract int waitFor() throws InterruptedException
- Waits for the subprocess to complete. This method returns
immediately if the subprocess has already terminated. If the
subprocess has not yet terminated, the calling thread will be
blocked until the subprocess exits.
- Returns:
- the exit value of the process.
- Throws: InterruptedException
- if the
waitFor
was
interrupted.
- Since:
- JDK1.0
All Packages Class Hierarchy This Package Previous Next Index