Package org.apache.tika.utils
Class CharsetUtils
- java.lang.Object
-
- org.apache.tika.utils.CharsetUtils
-
public class CharsetUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description CharsetUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
clean(String charsetName)
Handle various common charset name errors, and return something that will be considered valid (and is normalized)static Charset
forName(String name)
Returns Charset impl, if one exists.static boolean
isSupported(String charsetName)
Safely return whetheris supported, without throwing exceptions
-
-
-
Method Detail
-
isSupported
public static boolean isSupported(String charsetName)
Safely return whetheris supported, without throwing exceptions - Parameters:
charsetName
- Name of charset (can be null)- Returns:
- true if the character set is supported
-
clean
public static String clean(String charsetName)
Handle various common charset name errors, and return something that will be considered valid (and is normalized)- Parameters:
charsetName
- name of charset to process- Returns:
- potentially remapped/cleaned up version of charset name
-
-