public class TikaUtil extends Object
Constructor and Description |
---|
TikaUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
extractText(File file)
Extracts the text from the given file.
|
static String |
extractText(InputStream inputStream)
Extracts text from the given input stream.
|
static String |
getContentType(File file)
Extracts the content type from the given file.
|
static String |
getContentType(InputStream inputStream)
Extracts the content type from the given input stream.
|
public static String extractText(File file) throws ParseException, FileNotFoundException, IllegalArgumentException
file
- the file.ParseException
- if some error occur during parsing.IllegalArgumentException
- if the file is null
or if it does not represent a file.FileNotFoundException
- if the file does not exist.public static String extractText(InputStream inputStream) throws ParseException, IllegalArgumentException
inputStream
- the input stream.ParseException
- if some error occur during parsing.IllegalArgumentException
- if the input stream is null
.public static String getContentType(File file) throws ParseException, FileNotFoundException
file
- the file.ParseException
- if some error occur during parsing.IllegalArgumentException
- if the file is null
or if it does not represent a file.FileNotFoundException
- if the file does not exist.public static String getContentType(InputStream inputStream) throws ParseException
inputStream
- the input stream.ParseException
- if some error occur during parsing.IllegalArgumentException
- if the input stream is null
.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.