org.apache.avro.mapred

## Class FsInput

- java.lang.Object
- - org.apache.avro.mapred.FsInput

All Implemented Interfaces:
  Closeable, AutoCloseable, org.apache.avro.file.SeekableInput

    public class FsInput
    extends Object
    implements Closeable, org.apache.avro.file.SeekableInput

Adapt an `FSDataInputStream` to `SeekableInput`.

### Constructor Summary

Constructors
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`.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`long` `length()`
`int` `read(byte[] b, int off, int len)`
`void` `seek(long p)`
`long` `tell()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FsInput

    public FsInput(Path path,
                   Configuration conf)
            throws IOException

Construct given a path and a configuration.

Throws:
  `IOException`

#### FsInput

    public FsInput(Path path,
                   FileSystem fileSystem)
            throws IOException

Construct given a path and a `FileSystem`.

Throws:
  `IOException`

### Method Detail

#### length

    public long length()

Specified by:
  `length` in interface `org.apache.avro.file.SeekableInput`

#### read

    public int read(byte[] b,
                    int off,
                    int len)
             throws IOException

Specified by:
  `read` in interface `org.apache.avro.file.SeekableInput`
Throws:
  `IOException`

#### seek

    public void seek(long p)
              throws IOException

Specified by:
  `seek` in interface `org.apache.avro.file.SeekableInput`
Throws:
  `IOException`

#### tell

    public long tell()
              throws IOException

Specified by:
  `tell` in interface `org.apache.avro.file.SeekableInput`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `IOException`