|
||||||||||
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(FileSystem fs,
Path file,
Configuration conf)
|
|
FSDataInputStream(FileSystem fs,
Path file,
int bufferSize,
Configuration conf)
|
|
FSDataInputStream(FSInputStream in,
Configuration conf)
Construct without checksums. |
|
FSDataInputStream(FSInputStream in,
int bufferSize)
Construct without checksums. |
Method Summary | |
---|---|
long |
getPos()
|
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. |
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 |
Constructor Detail |
---|
public FSDataInputStream(FileSystem fs, Path file, int bufferSize, Configuration conf) throws IOException
IOException
public FSDataInputStream(FileSystem fs, Path file, Configuration conf) throws IOException
IOException
public FSDataInputStream(FSInputStream in, Configuration conf) throws IOException
IOException
public FSDataInputStream(FSInputStream in, int bufferSize) throws IOException
IOException
Method Detail |
---|
public void seek(long desired) throws IOException
Seekable
seek
in interface Seekable
IOException
public 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 |