THE PACKAGE JAVA.LANG
java.lang.Process
20.15
20.15 The Class
java.lang.Process
The method
exec
( 20.16.3) of class
Runtime
returns a reference to a
Process
object. The class
Process
provides methods for performing input from the pro
cess, performing output to the process, waiting for the process to complete, check
ing the exit status of the process, and destroying (killing) the process.
Dropping the last reference to a
Process
instance, thus allowing the
Process
object to be reclaimed, does
not
automatically kill the associated process.
There is no requirement that a process represented by a
Process
object exe
cute asynchronously or concurrently with respect to the Java process that owns the
Process
object.
public abstract class Process {
public abstract OutputStream getOutputStream();
public abstract InputStream getInputStream();
public abstract InputStream getErrorStream();
public abstract int waitFor()
throws InterruptedException;
public abstract int exitValue()
throws IllegalThreadStateException;
public abstract void destroy();
}
20.15.1
public abstract OutputStream getOutputStream()
This method returns an
OutputStream
. Output to the stream is piped into the
standard input stream of the process represented by this
Process
object.
Implementation note: It is a good idea for the output stream to be buffered.
20.15.2
public abstract InputStream getInputStream()
This method returns an
InputStream
. The stream obtains data piped from the
standard output stream of the process represented by this
Process
object.
Implementation note: It is a good idea for the input stream to be buffered.
20.15.3
public abstract InputStream getErrorStream()
This method returns an
InputStream
. The stream obtains data piped from the
error output stream of the process represented by this
Process
object.
Implementation note: It is a good idea for the input stream to be buffered.
561
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved