public final class HadoopDataInputStream extends FSDataInputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_SKIP_BYTES |
| Constructor and Description |
|---|
HadoopDataInputStream(org.apache.hadoop.fs.FSDataInputStream dataInputStream) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
forceSeek(long seekPos) |
org.apache.hadoop.fs.FSDataInputStream |
getHadoopInputStream() |
long |
getPos()
Gets the current position in the input stream.
|
java.io.Reader |
getReader() |
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
void |
seek(long seekPosition)
Seek to the given offset from the start of the file.
|
long |
skip(long n) |
void |
skipFully(long bytes) |
public static final int MIN_SKIP_BYTES
public HadoopDataInputStream(org.apache.hadoop.fs.FSDataInputStream dataInputStream)
public void seek(long seekPosition)
throws java.io.IOException
FSDataInputStreamseek in class FSDataInputStreamseekPosition - the desired offsetjava.io.IOException - Thrown if an error occurred while seeking inside the input stream.public long getPos()
throws java.io.IOException
FSDataInputStreamgetPos in class FSDataInputStreamjava.io.IOException - Thrown if an I/O error occurred in the underlying stream
implementation while accessing the stream's position.public java.io.Reader getReader()
getReader in class FSDataInputStreampublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic org.apache.hadoop.fs.FSDataInputStream getHadoopInputStream()
public void forceSeek(long seekPos)
throws java.io.IOException
java.io.IOExceptionpublic void skipFully(long bytes)
throws java.io.IOException
java.io.IOException