Improved build.xml
[vimdoclet.git] / sample / java.lang.Process.txt
blob4343b316d0ee74bd63358ebc9db5ce0f7b4eaa3b
1 *java.lang.Process* *Process* TheProcessBuilder#start()andRuntime#exec(String[],
3 public abstract class Process
4   extends    |java.lang.Object|
6 |java.lang.Process_Description|
7 |java.lang.Process_Fields|
8 |java.lang.Process_Constructors|
9 |java.lang.Process_Methods|
11 ================================================================================
13 *java.lang.Process_Constructors*
14 |java.lang.Process()|
16 *java.lang.Process_Methods*
17 |java.lang.Process.destroy()|Kills the subprocess.
18 |java.lang.Process.exitValue()|Returns the exit value for the subprocess.
19 |java.lang.Process.getErrorStream()|Gets the error stream of the subprocess.
20 |java.lang.Process.getInputStream()|Gets the input stream of the subprocess.
21 |java.lang.Process.getOutputStream()|Gets the output stream of the subprocess.
22 |java.lang.Process.waitFor()|causes the current thread to wait, if necessary, u
24 *java.lang.Process_Description*
26 The (|java.lang.ProcessBuilder|) and Runtime.exec(|java.lang.Runtime|) methods 
27 create a native process and return an instance of a subclass of Process that 
28 can be used to control the process and obtain information about it. The class 
29 Process provides methods for performing input from the process, performing 
30 output to the process, waiting for the process to complete, checking the exit 
31 status of the process, and destroying (killing) the process. 
33 The methods that create processes may not work well for special processes on 
34 certain native platforms, such as native windowing processes, daemon processes, 
35 Win16/DOS processes on Microsoft Windows, or shell scripts. The created 
36 subprocess does not have its own terminal or console. All its standard io (i.e. 
37 stdin, stdout, stderr) operations will be redirected to the parent process 
38 through three streams ( (|java.lang.Process|) , (|java.lang.Process|) , 
39 (|java.lang.Process|) ). The parent process uses these streams to feed input to 
40 and get output from the subprocess. Because some native platforms only provide 
41 limited buffer size for standard input and output streams, failure to promptly 
42 write the input stream or read the output stream of the subprocess may cause 
43 the subprocess to block, and even deadlock. 
45 The subprocess is not killed when there are no more references to the Process 
46 object, but rather the subprocess continues executing asynchronously. 
48 There is no requirement that a process represented by a Process object execute 
49 asynchronously or concurrently with respect to the Java process that owns the 
50 Process object. 
53 *java.lang.Process()*
55 public Process()
60 *java.lang.Process.destroy()*
62 public abstract void destroy()
64 Kills the subprocess. The subprocess represented by this Process object is 
65 forcibly terminated. 
68 *java.lang.Process.exitValue()*
70 public abstract int exitValue()
72 Returns the exit value for the subprocess. 
75     Returns: the exit value of the subprocess represented by this Process object. by 
76              convention, the value 0 indicates normal termination. 
77 *java.lang.Process.getErrorStream()*
79 public abstract |java.io.InputStream| getErrorStream()
81 Gets the error stream of the subprocess. The stream obtains data piped from the 
82 error output stream of the process represented by this Process object. 
84 Implementation note: It is a good idea for the input stream to be buffered. 
87     Returns: the input stream connected to the error stream of the subprocess. 
88 *java.lang.Process.getInputStream()*
90 public abstract |java.io.InputStream| getInputStream()
92 Gets the input stream of the subprocess. The stream obtains data piped from the 
93 standard output stream of the process represented by this Process object. 
95 Implementation note: It is a good idea for the input stream to be buffered. 
98     Returns: the input stream connected to the normal output of the subprocess. 
99 *java.lang.Process.getOutputStream()*
101 public abstract |java.io.OutputStream| getOutputStream()
103 Gets the output stream of the subprocess. Output to the stream is piped into 
104 the standard input stream of the process represented by this Process object. 
106 Implementation note: It is a good idea for the output stream to be buffered. 
109     Returns: the output stream connected to the normal input of the subprocess. 
110 *java.lang.Process.waitFor()*
112 public abstract int waitFor()
113   throws |java.lang.InterruptedException|
114          
115 causes the current thread to wait, if necessary, until the process represented 
116 by this Process object has terminated. This method returns immediately if the 
117 subprocess has already terminated. If the subprocess has not yet terminated, 
118 the calling thread will be blocked until the subprocess exits. 
121     Returns: the exit value of the process. By convention, 0 indicates normal termination.