Package org.apache.tika.util
Class PropsUtil
- java.lang.Object
-
- org.apache.tika.util.PropsUtil
-
public class PropsUtil extends Object
Utility class to handle properties. If the value is null, or if there is a parser error, the defaultMissing value will be returned.
-
-
Constructor Summary
Constructors Constructor Description PropsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Boolean
getBoolean(String v, Boolean defaultMissing)
Parses v.static File
getFile(String v, File defaultMissing)
Deprecated.static Integer
getInt(String v, Integer defaultMissing)
Parses v.static Long
getLong(String v, Long defaultMissing)
Parses v.static Path
getPath(String v, Path defaultMissing)
Parses v.static String
getString(String v, String defaultMissing)
Parses v.
-
-
-
Method Detail
-
getBoolean
public static Boolean getBoolean(String v, Boolean defaultMissing)
Parses v. If there is a problem, this returns defaultMissing.- Parameters:
v
- string to parsedefaultMissing
- value to return if value is null or unparseable- Returns:
- parsed value
-
getInt
public static Integer getInt(String v, Integer defaultMissing)
Parses v. If there is a problem, this returns defaultMissing.- Parameters:
v
- string to parsedefaultMissing
- value to return if value is null or unparseable- Returns:
- parsed value
-
getLong
public static Long getLong(String v, Long defaultMissing)
Parses v. If there is a problem, this returns defaultMissing.- Parameters:
v
- string to parsedefaultMissing
- value to return if value is null or unparseable- Returns:
- parsed value
-
getFile
@Deprecated public static File getFile(String v, File defaultMissing)
Deprecated.Parses v. If there is a problem, this returns defaultMissing.- Parameters:
v
- string to parsedefaultMissing
- value to return if value is null or unparseable- Returns:
- parsed value
- See Also:
getPath(String, Path)
-
getString
public static String getString(String v, String defaultMissing)
Parses v. If v is null, this returns defaultMissing.- Parameters:
v
- string to parsedefaultMissing
- value to return if value is null- Returns:
- parsed value
-
getPath
public static Path getPath(String v, Path defaultMissing)
Parses v. If there is a problem, this returns defaultMissing.- Parameters:
v
- string to parsedefaultMissing
- value to return if value is null or unparseable- Returns:
- parsed value
- See Also:
getPath(String, Path)
-
-