- java.lang.Object
- 
- java.io.InputStream
- 
- io.github.mmm.crypto.io.InputStreamWrapper
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 - Direct Known Subclasses:
- CryptorInputStream
 
 public class InputStreamWrapper extends InputStream AnInputStreamthat wraps anotherInputStreamto delegate from.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
 
- 
- 
Constructor SummaryConstructors Constructor Description InputStreamWrapper(InputStream delegate)The constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected InputStreamgetDelegate()intread()intread(byte[] b)intread(byte[] b, int off, int len)protected voidrequireNotClosed()- 
Methods inherited from class java.io.InputStreamavailable, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
 
- 
 
- 
- 
- 
Constructor Detail- 
InputStreamWrapperpublic InputStreamWrapper(InputStream delegate) The constructor.- Parameters:
- delegate- the- delegate. May not be- null.
 
 
- 
 - 
Method Detail- 
getDelegateprotected InputStream getDelegate() - Returns:
- the wrapped InputStreamto delegate from. May not benull.
 
 - 
requireNotClosedprotected void requireNotClosed() throws IOException- Throws:
- IOException- if the stream has already been closed.
 
 - 
readpublic int read() throws IOException- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic final int read(byte[] b) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b, int off, int len) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
 
- 
 
-