public class IgfsInputStreamImpl extends IgfsInputStream implements IgfsSecondaryFileSystemPositionedReadable
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
long |
bytes()
Gets bytes read.
|
void |
close() |
protected IgniteInternalFuture<byte[]> |
dataBlock(long blockIdx)
Get data block for specified block index.
|
long |
length()
Gets file length during file open.
|
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() |
mark, markSupported, read, reset, skipprotected final IgfsPath path
public long bytes()
public long length()
length in class IgfsInputStreampublic 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
pos - 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(long blockIdx) throws IgniteCheckedException
blockIdx - Block index.null if nothing found.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017