Class AbstractCommonInputStream
java.lang.Object
java.io.InputStream
io.clonecloudstore.common.standard.inputstream.AbstractCommonInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
CipherInputStream
,TransferInputStream
,ZstdCompressInputStream
Base class for InputStream extension
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtomicBoolean
protected final InputStream
protected final AtomicReference
<IOException> protected final OutputStream
protected final PipedInputStream
protected final PipedOutputStream
protected long
protected long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractCommonInputStream
(InputStream inputStream, Object extraArgument) -
Method Summary
Modifier and TypeMethodDescriptionint
protected void
void
close()
protected abstract OutputStream
getNewOutputStream
(Object extraArgument) boolean
int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) long
skip
(long n) toString()
long
transferTo
(OutputStream out) Methods inherited from class java.io.InputStream
mark, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes
-
Field Details
-
inputStream
-
outputStream
-
pipedInputStream
-
pipedOutputStream
-
ioExceptionAtomicReference
-
sizeRead
protected long sizeRead -
sizeOutput
protected long sizeOutput -
done
-
-
Constructor Details
-
AbstractCommonInputStream
protected AbstractCommonInputStream(InputStream inputStream, Object extraArgument) throws IOException - Throws:
IOException
-
-
Method Details
-
getNewOutputStream
- Throws:
IOException
-
checkException
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
transferTo
- Overrides:
transferTo
in classInputStream
- Throws:
IOException
-
toString
-