public final class HadoopDataInputStream extends FSDataInputStream
FSDataInputStream for the Hadoop's input streams.
This supports all file systems supported by Hadoop, such as HDFS and S3 (S3a/S3n).| Constructor and Description |
|---|
HadoopDataInputStream(org.apache.hadoop.fs.FSDataInputStream fsDataInputStream)
Creates a new data input stream from the given Hadoop 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() |
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
void |
seek(long desired) |
long |
skip(long n) |
mark, markSupported, read, resetpublic HadoopDataInputStream(org.apache.hadoop.fs.FSDataInputStream fsDataInputStream)
fsDataInputStream - The Hadoop input streampublic void seek(long desired)
throws IOException
seek in class FSDataInputStreamIOExceptionpublic long getPos()
throws IOException
getPos in class FSDataInputStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int read(@Nonnull byte[] buffer, int offset, int length) throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic org.apache.hadoop.fs.FSDataInputStream getHadoopInputStream()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.