Process


Process java.lang

Java 1.0

This class describes a process that is running externally to the Java interpreter. Note that a Process is very different from a Thread ; the Process class is abstract and cannot be instantiated . Call one of the Runtime. exec ( ) methods to start a process and return a corresponding Process object.

waitFor( ) blocks until the process exits. exitValue( ) returns the exit code of the process. destroy( ) kills the process. getErrorStream( ) returns an InputStream from which you can read any bytes the process sends to its standard error stream. getInputStream( ) returns an InputStream from which you can read any bytes the process sends to its standard output stream. getOutputStream( ) returns an OutputStream you can use to send bytes to the standard input stream of the process.

 public abstract class  Process  {  // Public Constructors  public  Process  ( );  // Public Instance Methods  public abstract void  destroy  ( );        public abstract int  exitValue  ( );        public abstract java.io.InputStream  getErrorStream  ( );        public abstract java.io.InputStream  getInputStream  ( );        public abstract java.io.OutputStream  getOutputStream  ( );        public abstract int  waitFor  ( ) throws InterruptedException;   } 

Returned By

ProcessBuilder.start( ) , Runtime.exec( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net