public class ExecOutputStream extends FilterOutputStream
Writer w = new OutputStreamWriter(new ExecOutputStream(new FileOutputStream("file"), "command"));
| Modifier and Type | Field and Description |
|---|---|
private InOutCopier |
copy |
private Process |
proc |
private OutputStream |
stdin |
private InputStream |
stdout |
out| Constructor and Description |
|---|
ExecOutputStream(OutputStream os,
Process p)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(OutputStream os,
String cmd)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(OutputStream os,
String[] cmd)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(OutputStream os,
String[] cmd,
String[] env)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(OutputStream os,
String cmd,
String[] env)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
private Process proc
private InputStream stdout
private OutputStream stdin
private InOutCopier copy
public ExecOutputStream(OutputStream os, Process p) throws IOException
os - Writes to this OutputStreamp - Filters data through stdin/out on this ProcessIOExceptionpublic ExecOutputStream(OutputStream os, String cmd) throws IOException
os - Writes to this OutputStreamcmd - Creates a Process from this string to filter data through stdin/outIOExceptionpublic ExecOutputStream(OutputStream os, String[] cmd) throws IOException
os - Writes to this OutputStreamcmd - Creates a Process from this string array (command, arg, ...) to filter data through stdin/outIOExceptionpublic ExecOutputStream(OutputStream os, String cmd, String[] env) throws IOException
os - Writes to this OutputStreamcmd - Creates a Process from this string to filter data through stdin/outenv - Setup the environment for the commandIOExceptionpublic ExecOutputStream(OutputStream os, String[] cmd, String[] env) throws IOException
os - Writes to this OutputStreamcmd - Creates a Process from this string array (command, arg, ...) to filter data through stdin/outenv - Setup the environment for the commandIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class FilterOutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionCopyright © 2015. All Rights Reserved.