public class IgfsInputStreamImpl extends IgfsInputStreamAdapter
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
long |
bytes()
Gets bytes read.
|
void |
close() |
protected IgniteInternalFuture<byte[]> |
dataBlock(IgfsFileInfo fileInfo,
long blockIdx)
Get data block for specified block index.
|
IgfsFileInfo |
fileInfo()
Gets file info for opened file.
|
long |
position()
Get the current position in the input stream.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
read(long pos,
byte[] buf,
int off,
int len)
Read up to the specified number of bytes, from a given position within a file, and return the number of bytes
read.
|
byte[][] |
readChunks(long pos,
int len)
Reads bytes from given position.
|
void |
readFully(long pos,
byte[] buf)
Read bytes from the given position in the stream to the given buffer.
|
void |
readFully(long pos,
byte[] buf,
int off,
int len) |
void |
seek(long pos)
Seek to the specified position.
|
String |
toString() |
lengthmark, markSupported, read, reset, skipprotected final IgfsPath path
public long bytes()
public IgfsFileInfo fileInfo()
fileInfo in class IgfsInputStreamAdapterpublic 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 IgfsInputStreampos - Position to seek to.IOException - In case of IO exception.public long position()
throws IOException
position in class IgfsInputStreamIOException - In case of IO exception.public int available()
throws IOException
available in class InputStreamIOExceptionpublic void readFully(long pos,
byte[] buf)
throws IOException
readFully in class IgfsInputStreampos - Position in the input stream to seek.buf - Buffer into which data is read.IOException - In case of IO exception.public void readFully(long pos,
byte[] buf,
int off,
int len)
throws IOException
readFully in class IgfsInputStreampos - Position in the input stream to seek.buf - Buffer into which data is read.off - Offset in the buffer from which stream data should be written.len - The number of bytes to read.IOException - In case of IO exception.public int read(long pos,
byte[] buf,
int off,
int len)
throws IOException
read in interface IgfsSecondaryFileSystemPositionedReadableread in class IgfsInputStreampos - Position in the input stream to seek.buf - Buffer into which data is read.off - Offset in the buffer from which stream data should be written.len - The number of bytes to read.IOException - In case of IO exception.public byte[][] readChunks(long pos,
int len)
throws IOException
readChunks in class IgfsInputStreamAdapterpos - 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 IgniteInternalFuture<byte[]> dataBlock(IgfsFileInfo fileInfo, long blockIdx) throws IgniteCheckedException
fileInfo - File info.blockIdx - Block index.null if nothing found.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015