|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.apache.hadoop.fs.FSInputStream
public abstract class FSInputStream
FSInputStream is a generic old InputStream with a little bit of RAF-style seek ability.
Constructor Summary | |
---|---|
FSInputStream()
|
Method Summary | |
---|---|
abstract long |
getPos()
Return the current offset from the start of the file |
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. |
abstract void |
seek(long pos)
Seek to the given offset from the start of the file. |
Methods inherited from class java.io.InputStream |
---|
available, close, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FSInputStream()
Method Detail |
---|
public abstract void seek(long pos) throws IOException
seek
in interface Seekable
IOException
public abstract long getPos() throws IOException
IOException
public int read(long position, byte[] buffer, int offset, int length) throws IOException
PositionedReadable
read
in interface PositionedReadable
IOException
public void readFully(long position, byte[] buffer, int offset, int length) throws IOException
PositionedReadable
readFully
in interface PositionedReadable
IOException
public void readFully(long position, byte[] buffer) throws IOException
PositionedReadable
readFully
in interface PositionedReadable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |