public final class HadoopDataInputStream extends FSDataInputStream
FSDataInputStream
for the
Hadoop Distributed File System.Constructor and Description |
---|
HadoopDataInputStream(org.apache.hadoop.fs.FSDataInputStream fsDataInputStream)
Creates a new data input stream from the given HDFS input stream
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
org.apache.hadoop.fs.FSDataInputStream |
getHadoopInputStream()
Gets the wrapped Hadoop input stream.
|
long |
getPos()
Get the current position in the input stream.
|
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
void |
seek(long desired)
Seek to the given offset from the start of the file.
|
long |
skip(long n) |
mark, markSupported, read, reset
public HadoopDataInputStream(org.apache.hadoop.fs.FSDataInputStream fsDataInputStream)
fsDataInputStream
- the HDFS input streampublic void seek(long desired) throws IOException
FSDataInputStream
seek
in class FSDataInputStream
desired
- the desired offsetIOException
- thrown if an error occurred while seeking inside the input streampublic long getPos() throws IOException
FSDataInputStream
getPos
in class FSDataInputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read(byte[] buffer, int offset, int length) throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public org.apache.hadoop.fs.FSDataInputStream getHadoopInputStream()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.