org.entityfs.support.nio
Class Charsets
java.lang.Object
org.entityfs.support.nio.Charsets
public final class Charsets
- extends Object
This class contains static utility methods for working with
Charset
:s.
- Since:
- 1.1
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UTF8
public static final Charset UTF8
- The UTF-8 charset.
encode
public static byte[] encode(CharSequence s,
Charset cs)
throws FileSystemException
- Encode the supplied text in the specified charset.
- Parameters:
s
- The text.cs
- The charset.
- Returns:
- A byte array containing the encoded string.
- Throws:
FileSystemException
- On character encoding errors.