|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tika.utils.ParseUtils
public class ParseUtils
Contains utility methods for parsing documents. Intended to provide simple entry points into the Tika framework.
Field Summary |
---|
Fields inherited from interface org.apache.tika.metadata.TikaMimeKeys |
---|
MIME_TYPE_MAGIC, TIKA_MIME_FILE |
Constructor Summary | |
---|---|
ParseUtils()
|
Method Summary | |
---|---|
static Parser |
getParser(File documentFile,
TikaConfig config)
Returns a parser that can handle the specified MIME type, and is set to receive input from a stream opened from the specified URL. |
static Parser |
getParser(String mimeType,
TikaConfig config)
Returns a parser that can handle the specified MIME type, and is set to receive input from a stream opened from the specified URL. |
static Parser |
getParser(URL documentUrl,
TikaConfig config)
Returns a parser that can handle the specified MIME type, and is set to receive input from a stream opened from the specified URL. |
static String |
getStringContent(File documentFile,
TikaConfig config)
Gets the string content of a document read from an input stream. |
static String |
getStringContent(File documentFile,
TikaConfig config,
String mimeType)
Gets the string content of a document read from an input stream. |
static String |
getStringContent(InputStream stream,
TikaConfig config,
String mimeType)
Gets the string content of a document read from an input stream. |
static String |
getStringContent(URL documentUrl,
TikaConfig config)
Gets the string content of a document read from an input stream. |
static String |
getStringContent(URL documentUrl,
TikaConfig config,
String mimeType)
Gets the string content of a document read from an input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParseUtils()
Method Detail |
---|
public static Parser getParser(String mimeType, TikaConfig config) throws TikaException
config
- mimeType
- the document's MIME type
TikaException
public static Parser getParser(URL documentUrl, TikaConfig config) throws TikaException
documentUrl
- URL pointing to the document to parseconfig
-
TikaException
public static Parser getParser(File documentFile, TikaConfig config) throws TikaException
documentFile
- File object pointing to the document to parseconfig
-
TikaException
public static String getStringContent(InputStream stream, TikaConfig config, String mimeType) throws TikaException, IOException
stream
- the stream from which to read document dataconfig
- mimeType
- MIME type of the data
TikaException
IOException
public static String getStringContent(URL documentUrl, TikaConfig config) throws TikaException, IOException
documentUrl
- URL pointing to the document to parseconfig
-
TikaException
IOException
public static String getStringContent(URL documentUrl, TikaConfig config, String mimeType) throws TikaException, IOException
documentUrl
- URL pointing to the document to parseconfig
- mimeType
- MIME type of the data
TikaException
IOException
public static String getStringContent(File documentFile, TikaConfig config, String mimeType) throws TikaException, IOException
documentFile
- File object pointing to the document to parseconfig
- mimeType
- MIME type of the data
TikaException
IOException
public static String getStringContent(File documentFile, TikaConfig config) throws TikaException, IOException
documentFile
- File object pointing to the document to parseconfig
-
TikaException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |