Package io.deephaven.extensions.barrage
Class DrainableByteArrayInputStream
java.lang.Object
java.io.InputStream
io.deephaven.extensions.barrage.util.DefensiveDrainable
io.deephaven.extensions.barrage.DrainableByteArrayInputStream
- All Implemented Interfaces:
io.grpc.Drainable
,Closeable
,AutoCloseable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
A defensive drainable needs to override available.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
close, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
DrainableByteArrayInputStream
public DrainableByteArrayInputStream(byte[] buf, int offset, int length)
-
-
Method Details
-
available
public int 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
-
drainTo
- Throws:
IOException
-