Package org.apache.avro.file

# Class SeekableFileInput

java.lang.Object
java.io.InputStream
java.io.FileInputStream
org.apache.avro.file.SeekableFileInput

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `SeekableInput`

public class SeekableFileInput extends FileInputStream implements SeekableInput
A `FileInputStream` that implements `SeekableInput`.

## Constructor Summary

Constructors
Constructor
Description
`SeekableFileInput(File file)`
`SeekableFileInput(FileDescriptor fd)`

## Method Summary

Modifier and Type
Method
Description
`long`
`length()`
Return the length of the file.
`void`
`seek(long p)`
Set the position for the next `read()`.
`long`
`tell()`
Return the position of the next `read()`.

### Methods inherited from class java.io.FileInputStream

`available, close, finalize, getChannel, getFD, read, read, read, skip`

### Methods inherited from class java.io.InputStream

`mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo`

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

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

### Methods inherited from interface java.io.Closeable

`close`

### Methods inherited from interface org.apache.avro.file.SeekableInput

`read`

## Constructor Details

### SeekableFileInput

public SeekableFileInput(File file) throws IOException

Throws:
  `IOException`

### SeekableFileInput

public SeekableFileInput(FileDescriptor fd) throws IOException

Throws:
  `IOException`

## Method Details

### seek

public void seek(long p) throws IOException
Description copied from interface: `SeekableInput`
Set the position for the next `read()`.

Specified by:
  `seek` in interface `SeekableInput`
Throws:
  `IOException`

### tell

public long tell() throws IOException
Description copied from interface: `SeekableInput`
Return the position of the next `read()`.

Specified by:
  `tell` in interface `SeekableInput`
Throws:
  `IOException`

### length

public long length() throws IOException
Description copied from interface: `SeekableInput`
Return the length of the file.

Specified by:
  `length` in interface `SeekableInput`
Throws:
  `IOException`