public class KeepAliveInputStream extends FilterInputStream
In code-language it means that it is not necessary to do:
if (out != System.in) { in.close(); }
in
Constructor and Description |
---|
KeepAliveInputStream(InputStream in)
Constructor of KeepAliveInputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method does nothing.
|
static InputStream |
wrapSystemIn()
Convenience factory method that returns a non-closing
InputStream around System.in.
|
available, mark, markSupported, read, read, read, reset, skip
public KeepAliveInputStream(InputStream in)
in
- an InputStream value, it should be standard input.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
- as we are overriding FilterInputStream.FilterInputStream.in
public static InputStream wrapSystemIn()