public abstract class FSInputStream extends InputStream implements Seekable, PositionedReadable
构造器和说明 |
---|
FSInputStream() |
限定符和类型 | 方法和说明 |
---|---|
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.
|
available, close, mark, markSupported, read, read, read, reset, skip
public abstract void seek(long pos) throws IOException
seek
在接口中 Seekable
IOException
public abstract long getPos() throws IOException
getPos
在接口中 Seekable
IOException
public abstract boolean seekToNewSource(long targetPos) throws IOException
seekToNewSource
在接口中 Seekable
IOException
public int read(long position, byte[] buffer, int offset, int length) throws IOException
PositionedReadable
read
在接口中 PositionedReadable
IOException
public void readFully(long position, byte[] buffer, int offset, int length) throws IOException
PositionedReadable
readFully
在接口中 PositionedReadable
IOException
public void readFully(long position, byte[] buffer) throws IOException
PositionedReadable
readFully
在接口中 PositionedReadable
IOException
Copyright © 2009 The Apache Software Foundation