@InterfaceAudience.LimitedPrivate(value="HDFS") @InterfaceStability.Unstable public abstract class FSInputStream extends InputStream implements Seekable, PositionedReadable
| Constructor and Description |
|---|
FSInputStream() |
| Modifier and Type | Method and Description |
|---|---|
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 equal 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.
|
available, close, mark, markSupported, read, read, read, reset, skippublic abstract void seek(long pos)
throws IOException
seek in interface SeekableIOExceptionpublic abstract long getPos()
throws IOException
getPos in interface SeekableIOExceptionpublic abstract boolean seekToNewSource(long targetPos)
throws IOException
seekToNewSource in interface SeekableIOExceptionpublic int read(long position,
byte[] buffer,
int offset,
int length)
throws IOException
PositionedReadableread in interface PositionedReadableIOExceptionpublic void readFully(long position,
byte[] buffer,
int offset,
int length)
throws IOException
PositionedReadablereadFully in interface PositionedReadableIOExceptionpublic void readFully(long position,
byte[] buffer)
throws IOException
PositionedReadablereadFully in interface PositionedReadableIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.