public 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 and Description |
---|
KeepAliveInputStream(java.io.InputStream in)
Constructor of KeepAliveInputStream.
|
Modifier and Type | Method and 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.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException
- as we are overriding FilterInputStream.public static java.io.InputStream wrapSystemIn()