Class Overview
Represents an external process. Enables writing to, reading from, destroying,
and waiting for the external process, as well as querying its exit value.
Summary
Public Methods |
abstract
void
|
destroy()
Terminates this process and closes any associated streams.
|
abstract
int
|
exitValue()
Returns the exit value of the native process represented by this object.
|
abstract
InputStream
|
getErrorStream()
Returns an input stream that is connected to the error stream
(stderr) of the native process represented by this object.
|
abstract
InputStream
|
getInputStream()
Returns an input stream that is connected to the standard output stream
(stdout) of the native process represented by this object.
|
abstract
OutputStream
|
getOutputStream()
Returns an output stream that is connected to the standard input stream
(stdin) of the native process represented by this object.
|
abstract
int
|
waitFor()
Causes the calling thread to wait for the native process associated with
this object to finish executing.
|
[Expand]
Inherited Methods |
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Constructors
Public Methods
public
abstract
void
destroy
()
Terminates this process and closes any associated streams.
public
abstract
int
exitValue
()
Returns the exit value of the native process represented by this object.
It is available only when the native process has terminated.
Returns
- the exit value of this process.
public
abstract
InputStream
getErrorStream
()
Returns an input stream that is connected to the error stream
(stderr) of the native process represented by this object.
Returns
- the input stream to read from the error stream associated with
the native process.
public
abstract
InputStream
getInputStream
()
Returns an input stream that is connected to the standard output stream
(stdout) of the native process represented by this object.
Returns
- the input stream to read from the output stream associated with
the native process.
public
abstract
OutputStream
getOutputStream
()
Returns an output stream that is connected to the standard input stream
(stdin) of the native process represented by this object.
Returns
- the output stream to write to the input stream associated with
the native process.
public
abstract
int
waitFor
()
Causes the calling thread to wait for the native process associated with
this object to finish executing.
Returns
- the exit value of the native process being waited on.