Package org.apache.tools.ant.util
Class KeepAliveInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.tools.ant.util.KeepAliveInputStream
- All Implemented Interfaces:
- java.io.Closeable,- java.lang.AutoCloseable
public class KeepAliveInputStream
extends java.io.FilterInputStream
Class that can be used to wrap 
System.in
 without getting anxious about any client closing the stream.
 In code-language it means that it is not necessary to do:
 if (out != System.in) {
   in.close();
 }
 - Since:
- Ant 1.6
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description KeepAliveInputStream(java.io.InputStream in)Constructor of KeepAliveInputStream.
- 
Method SummaryModifier and Type Method Description voidclose()This method does nothing.static java.io.InputStreamwrapSystemIn()Convenience factory method that returns a non-closing InputStream around System.in.Methods inherited from class java.io.FilterInputStreamavailable, mark, markSupported, read, read, read, reset, skip
- 
Constructor Details- 
KeepAliveInputStreampublic KeepAliveInputStream(java.io.InputStream in)Constructor of KeepAliveInputStream.- Parameters:
- in- an InputStream value, it should be standard input.
 
 
- 
- 
Method Details- 
closepublic void close() throws java.io.IOExceptionThis method does nothing.- Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Overrides:
- closein class- java.io.FilterInputStream
- Throws:
- java.io.IOException- as we are overriding FilterInputStream.
 
- 
wrapSystemInpublic static java.io.InputStream wrapSystemIn()Convenience factory method that returns a non-closing InputStream around System.in.- Returns:
- InputStream
- Since:
- Ant 1.8.0
 
 
-