home *** CD-ROM | disk | FTP | other *** search
- package java.lang;
-
- import java.io.BufferedInputStream;
- import java.io.BufferedOutputStream;
- import java.io.FileDescriptor;
- import java.io.FileInputStream;
- import java.io.FileOutputStream;
- import java.io.InputStream;
- import java.io.OutputStream;
-
- class Win32Process extends Process {
- private int handle;
- private FileDescriptor stdin_fd;
- private FileDescriptor stdout_fd;
- private FileDescriptor stderr_fd;
- private OutputStream stdin_stream;
- private InputStream stdout_stream;
- private InputStream stderr_stream;
-
- Win32Process(String[] var1, String[] var2) throws Exception {
- if (var1.length < 1) {
- throw new IllegalArgumentException();
- } else {
- StringBuffer var3 = new StringBuffer(var1[0]);
-
- for(int var4 = 1; var4 < var1.length; ++var4) {
- var3.append(' ').append(var1[var4]);
- }
-
- String var5 = var3.toString();
- String var6 = null;
- if (var2 != null) {
- StringBuffer var7 = new StringBuffer();
-
- for(int var8 = 0; var8 < var2.length; ++var8) {
- var7.append(var2[var8]).append('\u0000');
- }
-
- var6 = var7.toString();
- }
-
- this.stdin_fd = new FileDescriptor();
- this.stdout_fd = new FileDescriptor();
- this.stderr_fd = new FileDescriptor();
- this.create(var5, var6);
- this.stdin_stream = new BufferedOutputStream(new FileOutputStream(this.stdin_fd));
- this.stdout_stream = new BufferedInputStream(new FileInputStream(this.stdout_fd));
- this.stderr_stream = new FileInputStream(this.stderr_fd);
- }
- }
-
- public OutputStream getOutputStream() {
- return this.stdin_stream;
- }
-
- public InputStream getInputStream() {
- return this.stdout_stream;
- }
-
- public InputStream getErrorStream() {
- return this.stderr_stream;
- }
-
- public void finalize() {
- this.close();
- }
-
- public native int exitValue();
-
- public native int waitFor();
-
- public native void destroy();
-
- private native void create(String var1, String var2);
-
- private native void close();
- }
-