
ml.alternet.io.NoCloseReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alternet-tools Show documentation
Show all versions of alternet-tools Show documentation
Alternet Tools include discovery service tools, concurrent and locking tools, and more
The newest version!
package ml.alternet.io;
import java.io.FilterReader;
import java.io.IOException;
import java.io.Reader;
/**
* A filter that ignore {@link Reader#close()}.
*
* @author Philippe Poulard
*/
public class NoCloseReader extends FilterReader {
/**
* Create a NoCloseReader.
*
* @param in The input reader.
*/
public NoCloseReader( Reader in ) {
super( in );
}
/**
* Do not close.
* Use {@link #doClose()} instead.
*
* @see java.io.Reader#close()
*
* @throws IOException Never thrown.
*/
@Override
public void close() throws IOException { }
/**
* Really close the input.
*
* @see java.io.Reader#close()
*
* @throws IOException When an I/O error occurs.
*/
public void doClose() throws IOException {
super.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy