Package 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
Description
`InputFile(File file)`
Construct for the given file.

## Method Summary

Modifier and Type
Method
Description
`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 Details

### InputFile

public InputFile(File file) throws IOException
Construct for the given file.

Throws:
  `IOException`

## Method Details

### 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 `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Throws:
  `IOException`