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