|
||||||||||
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. |
abstract boolean |
seekToNewSource(long targetPos)
Seeks a different copy of the data. |
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 java.io.IOException
seek
in interface Seekable
java.io.IOException
public abstract long getPos() throws java.io.IOException
getPos
in interface Seekable
java.io.IOException
public abstract boolean seekToNewSource(long targetPos) throws java.io.IOException
seekToNewSource
in interface Seekable
java.io.IOException
public int read(long position, byte[] buffer, int offset, int length) throws java.io.IOException
PositionedReadable
read
in interface PositionedReadable
java.io.IOException
public void readFully(long position, byte[] buffer, int offset, int length) throws java.io.IOException
PositionedReadable
readFully
in interface PositionedReadable
java.io.IOException
public void readFully(long position, byte[] buffer) throws java.io.IOException
PositionedReadable
readFully
in interface PositionedReadable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |