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.
|
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 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-2012 The Apache Software Foundation. All Rights Reserved.