FileDocCategorySizeDatePackage
KeepAliveInputStream.javaAPI DocApache Ant 1.701716Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.util

KeepAliveInputStream

public class KeepAliveInputStream extends 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

Fields Summary
Constructors Summary
public KeepAliveInputStream(InputStream in)
Constructor of KeepAliveInputStream.

param
in an InputStream value, it should be standard input.

        super(in);
    
Methods Summary
public voidclose()
This method does nothing.

throws
IOException as we are overridding FilterInputStream.

        // do not close the stream