Package org.apache.tika.parser.strings
Class StringsConfig
java.lang.Object
org.apache.tika.parser.strings.StringsConfig
- All Implemented Interfaces:
Serializable
Configuration for the "strings" (or strings-alternative) command.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault contructor.Loads properties from InputStream and then tries to close InputStream. -
Method Summary
Modifier and TypeMethodDescriptionReturns the character encoding of the strings that are to be found.int
Returns the minimum sequence length (characters) to print.Returns the "strings" installation folder.int
Returns the maximum time (in seconds) to wait for the "strings" command to terminate.void
setEncoding
(StringsEncoding encoding) Sets the character encoding of the strings that are to be found.void
setMinLength
(int minLength) Sets the minimum sequence length (characters) to print.void
setStringsPath
(String path) Sets the "strings" installation folder.void
setTimeout
(int timeout) Sets the maximum time (in seconds) to wait for the "strings" command to terminate.
-
Constructor Details
-
StringsConfig
public StringsConfig()Default contructor. -
StringsConfig
Loads properties from InputStream and then tries to close InputStream. If there is an IOException, this silently swallows the exception and goes back to the default.- Parameters:
is
-
-
-
Method Details
-
getStringsPath
Returns the "strings" installation folder.- Returns:
- the "strings" installation folder.
-
getMinLength
public int getMinLength()Returns the minimum sequence length (characters) to print.- Returns:
- the minimum sequence length (characters) to print.
-
getEncoding
Returns the character encoding of the strings that are to be found.- Returns:
StringsEncoding
enum that represents the character encoding of the strings that are to be found.
-
getTimeout
public int getTimeout()Returns the maximum time (in seconds) to wait for the "strings" command to terminate.- Returns:
- the maximum time (in seconds) to wait for the "strings" command to terminate.
-
setStringsPath
Sets the "strings" installation folder.- Parameters:
path
- the "strings" installation folder.
-
setMinLength
public void setMinLength(int minLength) Sets the minimum sequence length (characters) to print.- Parameters:
minLength
- the minimum sequence length (characters) to print.
-
setEncoding
Sets the character encoding of the strings that are to be found.- Parameters:
encoding
-StringsEncoding
enum that represents the character encoding of the strings that are to be found.
-
setTimeout
public void setTimeout(int timeout) Sets the maximum time (in seconds) to wait for the "strings" command to terminate.- Parameters:
timeout
- the maximum time (in seconds) to wait for the "strings" command to terminate.
-