public class ExecOutputStream
extends java.io.FilterOutputStream
Writer w = new OutputStreamWriter(new ExecOutputStream(new FileOutputStream("file"), "command"));
Constructor and Description |
---|
ExecOutputStream(java.io.OutputStream os,
java.lang.Process p)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(java.io.OutputStream os,
java.lang.String cmd)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(java.io.OutputStream os,
java.lang.String[] cmd)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(java.io.OutputStream os,
java.lang.String[] cmd,
java.lang.String[] env)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
ExecOutputStream(java.io.OutputStream os,
java.lang.String cmd,
java.lang.String[] env)
Create a new ExecOutputStream on the given OutputStream
using the process to filter the stream.
|
public ExecOutputStream(java.io.OutputStream os, java.lang.Process p) throws java.io.IOException
os
- Writes to this OutputStreamp
- Filters data through stdin/out on this Processjava.io.IOException
public ExecOutputStream(java.io.OutputStream os, java.lang.String cmd) throws java.io.IOException
os
- Writes to this OutputStreamcmd
- Creates a Process from this string to filter data through stdin/outjava.io.IOException
public ExecOutputStream(java.io.OutputStream os, java.lang.String[] cmd) throws java.io.IOException
os
- Writes to this OutputStreamcmd
- Creates a Process from this string array (command, arg, ...) to filter data through stdin/outjava.io.IOException
public ExecOutputStream(java.io.OutputStream os, java.lang.String cmd, java.lang.String[] env) throws java.io.IOException
os
- Writes to this OutputStreamcmd
- Creates a Process from this string to filter data through stdin/outenv
- Setup the environment for the commandjava.io.IOException
public ExecOutputStream(java.io.OutputStream os, java.lang.String[] cmd, java.lang.String[] env) throws java.io.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 commandjava.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void finalize()
finalize
in class java.lang.Object