Package org.apache.trevni.avro

# Class HadoopInput

java.lang.Object
org.apache.trevni.avro.HadoopInput

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `org.apache.trevni.Input`

public class HadoopInput extends Object implements org.apache.trevni.Input
Adapt a Hadoop `FSDataInputStream` to Trevni's `Input`.

## Constructor Summary

Constructors
Constructor
Description
`HadoopInput(Path path, Configuration conf)`
Construct given a path and a configuration.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`long`
`length()`
`int`
`read(long p, byte[] b, int s, int l)`

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

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

## Constructor Details

### HadoopInput

public HadoopInput(Path path, Configuration conf) throws IOException
Construct given a path and a configuration.

Throws:
  `IOException`

## Method Details

### length

public long length()

Specified by:
  `length` in interface `org.apache.trevni.Input`

### read

public int read(long p, byte[] b, int s, int l) throws IOException

Specified by:
  `read` in interface `org.apache.trevni.Input`
Throws:
  `IOException`

### close

public void close() throws IOException

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