Package org.jgroups.blocks
Class GridInputStream
java.lang.Object
java.io.InputStream
org.jgroups.blocks.GridInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGridInputStream(GridFile file, ReplCache<String, byte[]> cache, int chunk_size) -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
cache
-
chunk_size
final int chunk_size -
name
-
file
-
index
int index -
local_index
int local_index -
current_buffer
byte[] current_buffer -
end_reached
boolean end_reached -
log
-
-
Constructor Details
-
GridInputStream
GridInputStream(GridFile file, ReplCache<String, byte[]> cache, int chunk_size) throws FileNotFoundException- Throws:
FileNotFoundException
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
getBytesRemainingInChunk
private int getBytesRemainingInChunk() -
fetchNextChunk
private byte[] fetchNextChunk() -
getChunkNumber
private int getChunkNumber()
-