public class FSFileResource extends java.lang.Object implements FileResource
| Modifier and Type | Field and Description |
|---|---|
private java.nio.file.Path |
fullPath |
private Metadata |
metadata |
private java.lang.String |
relativePath |
FILE_EXTENSION| Constructor and Description |
|---|
FSFileResource(java.io.File inputRoot,
java.io.File fullPath)
Deprecated.
to be removed in Tika 2.0
|
FSFileResource(java.nio.file.Path inputRoot,
java.nio.file.Path fullPath)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
private java.lang.String |
getExtension(java.nio.file.Path fullPath)
Simple extension extractor that takes whatever comes after the
last period in the path.
|
Metadata |
getMetadata()
This gets the metadata available before the parsing of the file.
|
java.lang.String |
getResourceId()
This is only used in logging to identify which file
may have caused problems.
|
java.io.InputStream |
openInputStream() |
private final java.nio.file.Path fullPath
private final java.lang.String relativePath
private final Metadata metadata
@Deprecated
public FSFileResource(java.io.File inputRoot,
java.io.File fullPath)
inputRoot - fullPath - FSFileResource(Path, Path)public FSFileResource(java.nio.file.Path inputRoot,
java.nio.file.Path fullPath)
inputRoot - the input root for the filefullPath - the full path to the filejava.lang.IllegalArgumentException - if the fullPath is not
a child of inputRootprivate java.lang.String getExtension(java.nio.file.Path fullPath)
If there is no period, it returns an empty string.
fullPath - full path from which to try to find an extensionpublic java.lang.String getResourceId()
FileResourcegetResourceId in interface FileResourcepublic Metadata getMetadata()
FileResourcegetMetadata in interface FileResourcepublic java.io.InputStream openInputStream()
throws java.io.IOException
openInputStream in interface FileResourcejava.io.IOException