Closeable
, AutoCloseable
public class ExecInputStream extends FilterInputStream
Reader r = new InputStreamReader(new ExecInputStream(new FileInputStream("file"), "command"));
in
Constructor | Description |
---|---|
ExecInputStream(InputStream is,
Process p) |
Create a new ExecInputStream on the given InputStream
using the process to filter the stream.
|
ExecInputStream(InputStream is,
String cmd) |
Create a new ExecInputStream on the given InputStream
using the process to filter the stream.
|
ExecInputStream(InputStream is,
String[] cmd) |
Create a new ExecInputStream on the given InputStream
using the process to filter the stream.
|
ExecInputStream(InputStream is,
String[] cmd,
String[] env) |
Create a new ExecInputStream on the given InputStream
using the process to filter the stream.
|
ExecInputStream(InputStream is,
String cmd,
String[] env) |
Create a new ExecInputStream on the given InputStream
using the process to filter the stream.
|
Modifier and Type | Method | Description |
---|---|---|
int |
available() |
|
void |
close() |
|
void |
finalize() |
|
void |
flush() |
|
void |
mark(int readlimit) |
|
boolean |
markSupported() |
|
int |
read() |
|
int |
read(byte[] b) |
|
int |
read(byte[] b,
int off,
int len) |
|
void |
reset() |
|
long |
skip(long n) |
readAllBytes, readNBytes, transferTo
public ExecInputStream(InputStream is, Process p) throws IOException
is
- Reads from this InputStreamp
- Filters data through stdin/out on this ProcessIOException
public ExecInputStream(InputStream is, String cmd) throws IOException
is
- Reads from this InputStreamcmd
- Creates a Process from this string to filter data through stdin/outIOException
public ExecInputStream(InputStream is, String[] cmd) throws IOException
is
- Reads from this InputStreamcmd
- Creates a Process from this string array (command, arg, ...) to filter data through stdin/outIOException
public ExecInputStream(InputStream is, String cmd, String[] env) throws IOException
is
- Reads from this InputStreamcmd
- Creates a Process from this string to filter data through stdin/outenv
- Setup the environment for the commandIOException
public ExecInputStream(InputStream is, String[] cmd, String[] env) throws IOException
is
- Reads from this InputStreamcmd
- 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 AutoCloseable
close
in interface Closeable
close
in class FilterInputStream
IOException
public void flush() throws IOException
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
public void mark(int readlimit)
mark
in class FilterInputStream
public boolean markSupported()
markSupported
in class FilterInputStream
public void reset()
reset
in class FilterInputStream