public class ExecInputStream extends FilterInputStream
Reader r = new InputStreamReader(new ExecInputStream(new FileInputStream("file"), "command"));
| Modifier and Type | Field and Description |
|---|---|
private InOutCopier |
copy |
private Process |
proc |
private OutputStream |
stdin |
private InputStream |
stdout |
in| Constructor and 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.
|
private Process proc
private InputStream stdout
private OutputStream stdin
private InOutCopier copy
public ExecInputStream(InputStream is, Process p) throws IOException
is - Reads from this InputStreamp - Filters data through stdin/out on this ProcessIOExceptionpublic ExecInputStream(InputStream is, String cmd) throws IOException
is - Reads from this InputStreamcmd - Creates a Process from this string to filter data through stdin/outIOExceptionpublic 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/outIOExceptionpublic 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 commandIOExceptionpublic 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 commandIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic void flush()
throws IOException
IOExceptionpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreampublic boolean markSupported()
markSupported in class FilterInputStreampublic void reset()
reset in class FilterInputStreamCopyright © 2015. All Rights Reserved.