Package org.apache.aries.util.io
Class RememberingInputStream
java.lang.Object
java.io.InputStream
org.apache.aries.util.io.RememberingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This class can be used to buffer an arbitrary amount of content from an input stream and be able to reset to
the start.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
RememberingInputStream
- Throws:
IOException
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
close
Noop. Does not close the passed in archive, which is kept open for further reading.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
closeUnderlying
Actually closes the underlying InputStream. Call this method instead of close, which is implemented as a no-op. Alternatively call close directly on the parent.- Throws:
IOException
-