Package org.apache.commons.io.input
Class AbstractInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.io.input.AbstractInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
CircularInputStream,MemoryMappedFileInputStream,NullInputStream,RandomAccessFileInputStream,ReaderInputStream
public abstract class AbstractInputStream extends java.io.InputStream
Abstracts some InputStream operations for implementations in this package.- Since:
- 2.17.0
-
-
Constructor Summary
Constructors Constructor Description AbstractInputStream()Constructs a new instance for subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisClosed()Tests whether this instance is closed; ifclose()completed successfully.voidsetClosed(boolean closed)Sets whether this instance is closed.
-
-
-
Constructor Detail
-
AbstractInputStream
public AbstractInputStream()
Constructs a new instance for subclasses.
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
isClosed
public boolean isClosed()
Tests whether this instance is closed; ifclose()completed successfully.- Returns:
- whether this instance is closed.
-
setClosed
public void setClosed(boolean closed)
Sets whether this instance is closed.- Parameters:
closed- whether this instance is closed.
-
-