加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090321043343/http://developer.android.com:80/reference/java/lang/Process.html
public abstract class

Process

extends Object
java.lang.Object
   ↳ java.lang.Process

Class Overview

Instances of class Process provide control of and access to platform processes.

Summary

Public Constructors
Process()
Public Methods
abstract void destroy()
Terimates the receiver and closes any associated streams.
abstract int exitValue()
Returns the exit value of the receiving Process.
abstract InputStream getErrorStream()
Returns the receiver's error output stream.
abstract InputStream getInputStream()
Returns the receiver's standard input stream

Note: This is an InputStream which allows reading from the other process' "stdout".

abstract OutputStream getOutputStream()
Returns the receiver's standard output stream

Note: This is an OutputStream which allows writing to the other process' "stdin".

abstract int waitFor()
Causes the calling thread to wait for the process associated with the receiver to finish executing.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Process ()

Public Methods

public abstract void destroy ()

Terimates the receiver and closes any associated streams.

public abstract int exitValue ()

Returns the exit value of the receiving Process. It is available only when the OS subprocess is finished.

Returns
  • The exit value of the receiver.
Throws
IllegalThreadStateException If the receiver has not terminated.

public abstract InputStream getErrorStream ()

Returns the receiver's error output stream.

Note: This is an InputStream which allows reading of the other threads "stderr".

Returns
  • The error stream associated with the receiver

public abstract InputStream getInputStream ()

Returns the receiver's standard input stream

Note: This is an InputStream which allows reading from the other process' "stdout".

Returns
  • The receiver's process' stdin.

public abstract OutputStream getOutputStream ()

Returns the receiver's standard output stream

Note: This is an OutputStream which allows writing to the other process' "stdin".

Returns
  • The receiver's process' stdout.

public abstract int waitFor ()

Causes the calling thread to wait for the process associated with the receiver to finish executing.

Returns
  • The exit value of the Process being waited on
Throws
InterruptedException If the calling thread is interrupted