Package io.deephaven.extensions.barrage
Class ConsecutiveDrainableStreams
java.lang.Object
java.io.InputStream
io.deephaven.extensions.barrage.util.DefensiveDrainable
io.deephaven.extensions.barrage.ConsecutiveDrainableStreams
- All Implemented Interfaces:
io.grpc.Drainable
,Closeable
,AutoCloseable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
A defensive drainable needs to override available.void
close()
int
drainTo
(OutputStream outputStream) Methods inherited from class io.deephaven.extensions.barrage.util.DefensiveDrainable
capture, read, read, read, skip
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
ConsecutiveDrainableStreams
-
-
Method Details
-
drainTo
- Throws:
IOException
-
available
Description copied from class:DefensiveDrainable
A defensive drainable needs to override available. As opposed to the genericInputStream
, this method must return the exact amount available.- Overrides:
available
in classDefensiveDrainable
- Returns:
- the exact amount available
- Throws:
IOException
- if an I/O exception occursSizeException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-