public class ExecOutputStream extends FilterOutputStream
Writer w = new OutputStreamWriter(new ExecOutputStream(new FileOutputStream("file"), "command"));
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.
|
public ExecOutputStream(OutputStream os, Process p) throws IOException
os
- Writes to this OutputStreamp
- Filters data through stdin/out on this ProcessIOException
public ExecOutputStream(OutputStream os, String cmd) throws IOException
os
- Writes to this OutputStreamcmd
- Creates a Process from this string to filter data through stdin/outIOException
public 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/outIOException
public 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 commandIOException
public 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 commandIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterOutputStream
IOException
public void write(byte[] b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException