public class RedirectInput
extends java.io.InputStream
| Constructor and Description |
|---|
RedirectInput()
Create a redirector without an original
|
RedirectInput(java.io.InputStream in)
Create a redirector input stream with an original input stream
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String s)
Provide the string that should be treated as input for the running code.
|
void |
close() |
java.io.InputStream |
getOrg()
Get the original inputstream, potentially null
|
int |
read()
Read a byte from the input buffer.
|
int |
read(byte[] buffer) |
int |
read(byte[] buffer,
int offset,
int length)
And the read for a larger buffer
|
public RedirectInput(java.io.InputStream in)
throws java.io.IOException
in - the originaljava.io.IOExceptionpublic RedirectInput()
public java.io.InputStream getOrg()
public void add(java.lang.String s)
throws java.io.IOException
s - the stringjava.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreampublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buffer)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionCopyright (c) aQute SARL (2000, 2016) and others. All Rights Reserved.