public class GridGgfsInputStreamImpl extends GridGgfsInputStreamAdapter
| Modifier and Type | Field and Description |
|---|---|
protected org.gridgain.grid.ggfs.GridGgfsPath |
path
Path to file.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
long |
bytes()
Gets bytes read.
|
void |
close() |
protected org.gridgain.grid.GridFuture<byte[]> |
dataBlock(GridGgfsFileInfo fileInfo,
long blockIdx)
Get data block for specified block index.
|
GridGgfsFileInfo |
fileInfo()
Gets file info for opened file.
|
long |
position() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
read(long pos,
byte[] buf,
int off,
int len) |
byte[][] |
readChunks(long pos,
int len)
Reads bytes from given position.
|
void |
readFully(long pos,
byte[] buf) |
void |
readFully(long pos,
byte[] buf,
int off,
int len) |
void |
seek(long pos) |
String |
toString() |
lengthmark, markSupported, read, reset, skippublic long bytes()
public GridGgfsFileInfo fileInfo()
fileInfo in class GridGgfsInputStreamAdapterpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(@NotNull
byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void seek(long pos)
throws IOException
seek in class org.gridgain.grid.ggfs.GridGgfsInputStreamIOExceptionpublic long position()
throws IOException
position in class org.gridgain.grid.ggfs.GridGgfsInputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void readFully(long pos,
byte[] buf)
throws IOException
readFully in class org.gridgain.grid.ggfs.GridGgfsInputStreamIOExceptionpublic void readFully(long pos,
byte[] buf,
int off,
int len)
throws IOException
readFully in class org.gridgain.grid.ggfs.GridGgfsInputStreamIOExceptionpublic int read(long pos,
byte[] buf,
int off,
int len)
throws IOException
read in class org.gridgain.grid.ggfs.GridGgfsInputStreamIOExceptionpublic byte[][] readChunks(long pos,
int len)
throws IOException
readChunks in class GridGgfsInputStreamAdapterpos - Position to read from.len - Number of bytes to read.IOException - If read failed.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException@Nullable protected org.gridgain.grid.GridFuture<byte[]> dataBlock(GridGgfsFileInfo fileInfo, long blockIdx) throws org.gridgain.grid.GridException
fileInfo - File info.blockIdx - Block index.null if nothing found.org.gridgain.grid.GridException - If failed.Copyright © 2014. All rights reserved.