org.freehep.util.io.NoCloseReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of freehep-io Show documentation
Show all versions of freehep-io Show documentation
FreeHEP extension to the java.io library
// Copyright 2003, FreeHEP.
package org.freehep.util.io;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
/**
* The NoCloseReader ignores the close so that one can keep reading from the
* underlying stream.
*
* @author Mark Donszelmann
* @version $Id: src/main/java/org/freehep/util/io/NoCloseReader.java
* 96b41b903496 2005/11/21 19:50:18 duns $
*/
public class NoCloseReader extends BufferedReader {
/**
* Creates a No Close Reader.
*
* @param reader
* reader to read from
*/
public NoCloseReader(Reader reader) {
super(reader);
}
/**
* Creates a No Close Reader.
*
* @param reader
* reader to read from
* @param size
* buffer size
*/
public NoCloseReader(Reader reader, int size) {
super(reader, size);
}
@Override
public void close() throws IOException {
}
/**
* Closes the reader (close is ignored).
*
* @throws IOException
* if the close fails
*/
public void realClose() throws IOException {
super.close();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy