# Class: com.pnfsoftware.jeb.core.input.FileInput

An [IInput](IInput) backed by a filesystem entry. Nested entries inside zip archives are also supported and must be addressed with a bang\-separated path, for example `/some/path/file.zip!a/b/c/data.bin`.

## Constructor: FileInput
- parameter: `file`, type: `java.io.File`

Description: Create a file input for a filesystem entry or zip entry path.
parameter: file: target file
throws: on I/O error

## Constructor: FileInput
- parameter: `file`, type: `java.io.File`
- parameter: `hardFail`, type: `boolean`

Description: Create a file input for a filesystem entry or zip entry path.
parameter: file: target file
parameter: hardFail: if `true`, fail immediately when the input cannot be resolved
throws: on I/O error

## Constructor: FileInput
- parameter: `file`, type: `java.io.File`
- parameter: `hardFail`, type: `boolean`
- parameter: `readHeader`, type: `boolean`

Description: Create a file input for a filesystem entry or zip entry path.
parameter: file: target file
parameter: hardFail: if `true`, fail immediately when the input cannot be resolved
parameter: readHeader: if `true`, eagerly read the input header
throws: on I/O error

## Constructor: FileInput
- parameter: `path`, type: `java.lang.String`

Description: Create a file input for a filesystem entry or zip entry path.
parameter: path: filesystem path or bang\-separated zip entry path
throws: on I/O error

## Constructor: FileInput
- parameter: `path`, type: `java.lang.String`
- parameter: `hardFail`, type: `boolean`

Description: Create a file input for a filesystem entry or zip entry path.
parameter: path: filesystem path or bang\-separated zip entry path
parameter: hardFail: if `true`, fail immediately when the input cannot be resolved
throws: on I/O error

## Constructor: FileInput
- parameter: `path`, type: `java.lang.String`
- parameter: `hardFail`, type: `boolean`
- parameter: `readHeader`, type: `boolean`

Description: Create a file input for a filesystem entry or zip entry path.
parameter: path: filesystem path or bang\-separated zip entry path
parameter: hardFail: if `true`, fail immediately when the input cannot be resolved
parameter: readHeader: if `true`, eagerly read the input header
throws: on I/O error

## Static Field: SER_FLAG_FULL_PERSISTENCE
Type: `int`

Constant value: `1`
Description: This flag indicates that the serialization of this object should include a full bytes copy of the underlying file.

## Method: canRead
- return type: `boolean`


## Method: close


## Method: getChannel
- return type: `java.nio.channels.SeekableByteChannel`


## Method: getCurrentSize
- return type: `long`


## Method: getFile
- return type: `java.io.File`

Description: Retrieve the input file.
return: the input file, null if the input is invalid

## Method: getHeader
- return type: `java.nio.ByteBuffer`


## Method: getName
- return type: `java.lang.String`


## Method: getPath
- return type: `java.lang.String`

Description: Retrieve the resolved input path.
return: the absolute or base\-resolved filesystem path, or the bang\-separated archive entry         path, depending on how this input was configured

## Method: getPathBase
- return type: `java.lang.String`

Description: Retrieve the optional base used to resolve [#getPersistedPath()](#getPersistedPath()).
return: the current path base, or `null` if none is set

## Method: getPersistedPath
- return type: `java.lang.String`

Description: Return the path element that would be persisted if this element is serialized.
return: may be null; may differ from [#getPath()](#getPath())

## Method: getStream
- return type: `java.io.InputStream`


## Method: rebase
- parameter: `base`, type: `java.lang.String`
- return type: `boolean`

Description: Force a new base and reopen the file. The input must not have a base and the current path must not be an absolute path for this method to succeed. \(If that is the case, [#setBase(String)](#setBase(String)) should be used instead.\)
parameter: base: the forced new base
return: success indicator

## Method: setBase
- parameter: `base`, type: `java.lang.String`
- return type: `boolean`

Description: Set the base for this input, assuming it is referring to a valid file \(i.e. [#getFile()](#getFile()) is non\-null\).
parameter: base: the new base; null to remove any existing base
return: success indicator

## Method: setFile
- parameter: `file`, type: `java.io.File`

Description: Attach a file to this input if it is currently unresolved.
parameter: file: file to associate with this input
throws: if a file is already attached or if the new file cannot be processed

## Method: toString
- return type: `java.lang.String`


