Package org.apache.ignite.internal.util
Class GridFixedSizeInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.ignite.internal.util.GridFixedSizeInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class GridFixedSizeInputStream extends InputStream
Input stream wrapper which allows to read exactly expected number of bytes.
-
-
Constructor Summary
Constructors Constructor Description GridFixedSizeInputStream(InputStream in, long size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()intread()intread(byte[] b, int off, int len)-
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
GridFixedSizeInputStream
public GridFixedSizeInputStream(InputStream in, long size)
- Parameters:
in- Input stream.size- Size of available data.
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
-