The charset package contains classes which work with the Java charset package. It allows to guess the encoding of a file.
Note that there is no way to get the encoding of a file except by guessing. Nothing in a file explictly set its encoding.
Packaging
The io.charset package is derived from a small part of the code of the Java ICU project (version 58.2). It is licensed under the ICU license, which is compatible with the BSD license.
Usage
To guess the encoding of a particular file, you can use one of the following methods:
The result can be used in all Java methods which uses a charset, such as for example String.getBytes(String). See for example the StringUtils.escapeString(String) method which escapes Strings encoded in a particular charset.
See also
io: This article is about the org.mdiutil.io package