Closeable, Flushable, AutoCloseablepublic class ExecOutputStream extends FilterOutputStream
Writer w = new OutputStreamWriter(new ExecOutputStream(new FileOutputStream("file"), "command"));
out| Constructor | 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.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
finalize() |
|
void |
flush() |
|
void |
write(byte[] b) |
|
void |
write(byte[] b,
int off,
int len) |
|
void |
write(int b) |
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 AutoCloseableclose in interface Closeableclose 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 FilterOutputStreamIOException