|
||||||||||
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(java.io.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(java.lang.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(java.net.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 java.lang.String |
getStringContent(java.io.File documentFile,
TikaConfig config)
Gets the string content of a document read from an input stream. |
static java.lang.String |
getStringContent(java.io.File documentFile,
TikaConfig config,
java.lang.String mimeType)
Gets the string content of a document read from an input stream. |
static java.lang.String |
getStringContent(java.io.InputStream stream,
TikaConfig config,
java.lang.String mimeType)
Gets the string content of a document read from an input stream. |
static java.lang.String |
getStringContent(java.net.URL documentUrl,
TikaConfig config)
Gets the string content of a document read from an input stream. |
static java.lang.String |
getStringContent(java.net.URL documentUrl,
TikaConfig config,
java.lang.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(java.lang.String mimeType, TikaConfig config) throws TikaException
config
- mimeType
- the document's MIME type
TikaException
public static Parser getParser(java.net.URL documentUrl, TikaConfig config) throws TikaException
documentUrl
- URL pointing to the document to parseconfig
-
TikaException
public static Parser getParser(java.io.File documentFile, TikaConfig config) throws TikaException
documentFile
- File object pointing to the document to parseconfig
-
TikaException
public static java.lang.String getStringContent(java.io.InputStream stream, TikaConfig config, java.lang.String mimeType) throws TikaException, java.io.IOException
stream
- the stream from which to read document dataconfig
- mimeType
- MIME type of the data
TikaException
java.io.IOException
public static java.lang.String getStringContent(java.net.URL documentUrl, TikaConfig config) throws TikaException, java.io.IOException
documentUrl
- URL pointing to the document to parseconfig
-
TikaException
java.io.IOException
public static java.lang.String getStringContent(java.net.URL documentUrl, TikaConfig config, java.lang.String mimeType) throws TikaException, java.io.IOException
documentUrl
- URL pointing to the document to parseconfig
- mimeType
- MIME type of the data
TikaException
java.io.IOException
public static java.lang.String getStringContent(java.io.File documentFile, TikaConfig config, java.lang.String mimeType) throws TikaException, java.io.IOException
documentFile
- File object pointing to the document to parseconfig
- mimeType
- MIME type of the data
TikaException
java.io.IOException
public static java.lang.String getStringContent(java.io.File documentFile, TikaConfig config) throws TikaException, java.io.IOException
documentFile
- File object pointing to the document to parseconfig
-
TikaException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |