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
IOException
public FsInput(Path path, FileSystem fileSystem) throws IOException
FileSystem
.IOException
public long length()
SeekableInput
length
in interface SeekableInput
public int read(byte[] b, int off, int len) throws IOException
SeekableInput
InputStream.read(byte[],int,int)
.read
in interface SeekableInput
IOException
public void seek(long p) throws IOException
SeekableInput
read()
.seek
in interface SeekableInput
IOException
public long tell() throws IOException
SeekableInput
read()
.tell
in interface SeekableInput
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2009–2022 The Apache Software Foundation. All rights reserved.