Package org.apache.tika.parser.strings
Class StringsConfig
java.lang.Object
org.apache.tika.parser.strings.StringsConfig
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
StringsConfig.RuntimeConfig
Configuration for the "strings" (or strings-alternative) command.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRuntimeConfig blocks modification of security-sensitive path fields at runtime. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the character encoding of the strings that are to be found.Returns the path to the "file" command.intReturns the minimum sequence length (characters) to print.Returns the "strings" installation folder.intReturns the maximum time (in seconds) to wait for the "strings" command to terminate.voidsetEncoding(StringsEncoding encoding) Sets the character encoding of the strings that are to be found.voidsetFilePath(String filePath) Sets the path to the "file" command.voidsetMinLength(int minLength) Sets the minimum sequence length (characters) to print.voidsetStringsPath(String stringsPath) Sets the "strings" installation folder.voidsetTimeoutSeconds(int timeoutSeconds) Sets the maximum time (in seconds) to wait for the "strings" command to terminate.
-
Constructor Details
-
StringsConfig
public StringsConfig()
-
-
Method Details
-
getStringsPath
Returns the "strings" installation folder.- Returns:
- the "strings" installation folder.
-
setStringsPath
Sets the "strings" installation folder.- Parameters:
stringsPath- the "strings" installation folder.- Throws:
TikaConfigException
-
getFilePath
Returns the path to the "file" command.- Returns:
- the path to the "file" command.
-
setFilePath
Sets the path to the "file" command.- Parameters:
filePath- the path to the "file" command.- Throws:
TikaConfigException
-
getMinLength
public int getMinLength()Returns the minimum sequence length (characters) to print.- Returns:
- the minimum sequence length (characters) to print.
-
setMinLength
public void setMinLength(int minLength) Sets the minimum sequence length (characters) to print.- Parameters:
minLength- the minimum sequence length (characters) to print.
-
getEncoding
Returns the character encoding of the strings that are to be found.- Returns:
StringsEncodingenum that represents the character encoding of the strings that are to be found.
-
setEncoding
Sets the character encoding of the strings that are to be found.- Parameters:
encoding-StringsEncodingenum that represents the character encoding of the strings that are to be found.
-
getTimeoutSeconds
public int getTimeoutSeconds()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.
-
setTimeoutSeconds
public void setTimeoutSeconds(int timeoutSeconds) Sets the maximum time (in seconds) to wait for the "strings" command to terminate.- Parameters:
timeoutSeconds- the maximum time (in seconds) to wait for the "strings" command to terminate.
-