public class SerializableCharset extends Object implements Serializable
Charset.
It serializes itself by writing out the name of the character set, for example "ISO-8859-1". On the other side, it deserializes itself by looking for a charset with the same name.
A SerializableCharset is immutable.
| Modifier and Type | Field and Description |
|---|---|
private Charset |
charset |
private String |
charsetName |
| Modifier | Constructor and Description |
|---|---|
private |
SerializableCharset(Charset charset)
Creates a SerializableCharset.
|
| Modifier and Type | Method and Description |
|---|---|
static SerializableCharset |
forCharset(Charset charset)
Returns a SerializableCharset wrapping the given Charset, or null if the
charset is null. |
Charset |
getCharset()
Returns the wrapped
Charset. |
private void |
readObject(ObjectInputStream in)
Per
Serializable. |
private void |
writeObject(ObjectOutputStream out)
Per
Serializable. |
private SerializableCharset(Charset charset)
forCharset(Charset).charset - Character set; must not be nullprivate void writeObject(ObjectOutputStream out) throws IOException
Serializable.IOExceptionprivate void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
Serializable.IOExceptionClassNotFoundExceptionpublic static SerializableCharset forCharset(Charset charset)
charset is null.charset - Character set to wrap, or nullCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.