Package org.apache.tika.io
Class IsolatedInput
java.lang.Object
org.apache.tika.io.IsolatedInput
- All Implemented Interfaces:
Closeable,AutoCloseable
A document under a fixed name in a directory of its own, for handing to an external
program or a library that opens files by path.
The file is a hard link where the file system allows one; else a copy if the document is small, a symbolic link if it is large, and a copy if neither link can be made. Closing removes the directory and whatever the reader left in it; the source keeps its content.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getPath()static IsolatedInputstatic IsolatedInputstatic IsolatedInputThe file gets an extension of the media type Tika gave the document, since some readers need one: the document's own extension if it is one of that type's, else the type's usual one.
-
Method Details
-
of
- Throws:
IOException
-
of
The file gets an extension of the media type Tika gave the document, since some readers need one: the document's own extension if it is one of that type's, else the type's usual one.- Throws:
IOException
-
of
- Parameters:
extension- appended to the fixed name, for a reader that needs one- Throws:
IOException
-
getPath
- Returns:
- the document, as an absolute path
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-