|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.apache.hadoop.fs.FSDataInputStream
public class FSDataInputStream
Utility that wraps a FSInputStream in a DataInputStream
and buffers input through a BufferedInputStream.
| Field Summary |
|---|
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
FSDataInputStream(InputStream in)
|
|
| Method Summary | |
|---|---|
FileDescriptor |
getFileDescriptor()
|
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. |
void |
seek(long desired)
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.DataInputStream |
|---|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes |
| Methods inherited from class java.io.FilterInputStream |
|---|
available, close, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Constructor Detail |
|---|
public FSDataInputStream(InputStream in)
throws IOException
IOException| Method Detail |
|---|
public void seek(long desired)
throws IOException
Seekable
seek in interface SeekableIOException
public long getPos()
throws IOException
Seekable
getPos in interface SeekableIOException
public int read(long position,
byte[] buffer,
int offset,
int length)
throws IOException
PositionedReadable
read in interface PositionedReadableIOException
public void readFully(long position,
byte[] buffer,
int offset,
int length)
throws IOException
PositionedReadable
readFully in interface PositionedReadableIOException
public void readFully(long position,
byte[] buffer)
throws IOException
PositionedReadable
readFully in interface PositionedReadableIOException
public boolean seekToNewSource(long targetPos)
throws IOException
Seekable
seekToNewSource in interface SeekableIOException
public FileDescriptor getFileDescriptor()
throws IOException
getFileDescriptor in interface HasFileDescriptorIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||