org.apache.trevni

## Class InputFile

- java.lang.Object
- - org.apache.trevni.InputFile

All Implemented Interfaces:
  Closeable, AutoCloseable, Input

    public class InputFile
    extends Object
    implements Input

An `Input` for files.

### Constructor Summary

Constructors
Constructor and Description
`InputFile(File file)` Construct for the given file.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`long` `length()` Return the total length of the input.
`int` `read(long position, byte[] b, int start, int len)` Positioned read.

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

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

### Constructor Detail

#### InputFile

    public InputFile(File file)
              throws IOException

Construct for the given file.

Throws:
  `IOException`

### Method Detail

#### length

    public long length()
                throws IOException

Description copied from interface: `Input`
Return the total length of the input.

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

#### read

    public int read(long position,
                    byte[] b,
                    int start,
                    int len)
             throws IOException

Description copied from interface: `Input`
Positioned read.

Specified by:
  `read` in interface `Input`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

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