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:
- Closeable,- AutoCloseable
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 SummaryFields inherited from class java.io.FilterInputStreamin
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()This method does nothing.static InputStreamConvenience factory method that returns a non-closing InputStream around System.in.Methods inherited from class java.io.FilterInputStreamavailable, mark, markSupported, read, read, read, reset, skipMethods inherited from class java.io.InputStreamnullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
- 
Constructor Details- 
KeepAliveInputStreamConstructor of KeepAliveInputStream.- Parameters:
- in- an InputStream value, it should be standard input.
 
 
- 
- 
Method Details- 
closeThis method does nothing.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- FilterInputStream
- Throws:
- IOException- as we are overriding FilterInputStream.
 
- 
wrapSystemInConvenience factory method that returns a non-closing InputStream around System.in.- Returns:
- InputStream
- Since:
- Ant 1.8.0
 
 
-