|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
tachyon.hadoop.TFileInputStreamHdfs
public class TFileInputStreamHdfs
Constructor Summary | |
---|---|
TFileInputStreamHdfs(TachyonClient tachyonClient,
int fileId,
org.apache.hadoop.fs.Path hdfsPath,
org.apache.hadoop.conf.Configuration conf,
int bufferSize)
|
Method Summary | |
---|---|
void |
close()
|
long |
getPos()
Return the current offset from the start of the file |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
int |
read(long position,
byte[] buffer,
int offset,
int length)
Read upto the specified number of bytes, from a given position within a file, and return the number of bytes read. |
void |
readFully(long position,
byte[] buffer)
Read number of bytes equalt to the length of the buffer, from a given position within a file. |
void |
readFully(long position,
byte[] buffer,
int offset,
int length)
Read the specified number of bytes, from a given position within a file. |
void |
seek(long pos)
Seek to the given offset from the start of the file. |
boolean |
seekToNewSource(long targetPos)
Seeks a different copy of the data. |
Methods inherited from class java.io.InputStream |
---|
available, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TFileInputStreamHdfs(TachyonClient tachyonClient, int fileId, org.apache.hadoop.fs.Path hdfsPath, org.apache.hadoop.conf.Configuration conf, int bufferSize)
Method Detail |
---|
public int read(long position, byte[] buffer, int offset, int length) throws IOException
read
in interface org.apache.hadoop.fs.PositionedReadable
IOException
public void readFully(long position, byte[] buffer) throws IOException
readFully
in interface org.apache.hadoop.fs.PositionedReadable
IOException
public void readFully(long position, byte[] buffer, int offset, int length) throws IOException
readFully
in interface org.apache.hadoop.fs.PositionedReadable
IOException
public long getPos() throws IOException
getPos
in interface org.apache.hadoop.fs.Seekable
IOException
public void seek(long pos) throws IOException
seek
in interface org.apache.hadoop.fs.Seekable
IOException
public boolean seekToNewSource(long targetPos) throws IOException
seekToNewSource
in interface org.apache.hadoop.fs.Seekable
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |