public class FsInput extends Object implements Closeable, SeekableInput
FSDataInputStream to SeekableInput.| Constructor and Description |
|---|
FsInput(Path path,
Configuration conf)
Construct given a path and a configuration.
|
FsInput(Path path,
FileSystem fileSystem)
Construct given a path and a
FileSystem. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
length()
Return the length of the file.
|
int |
read(byte[] b,
int off,
int len)
Equivalent to
InputStream.read(byte[],int,int). |
void |
seek(long p)
Set the position for the next
read(). |
long |
tell()
Return the position of the next
read(). |
public FsInput(Path path, Configuration conf) throws IOException
IOExceptionpublic FsInput(Path path, FileSystem fileSystem) throws IOException
FileSystem.IOExceptionpublic long length()
SeekableInputlength in interface SeekableInputpublic int read(byte[] b,
int off,
int len)
throws IOException
SeekableInputInputStream.read(byte[],int,int).read in interface SeekableInputIOExceptionpublic void seek(long p)
throws IOException
SeekableInputread().seek in interface SeekableInputIOExceptionpublic long tell()
throws IOException
SeekableInputread().tell in interface SeekableInputIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2009–2023 The Apache Software Foundation. All rights reserved.