Class SerializableCharset

java.lang.Object
org.apache.calcite.util.SerializableCharset
All Implemented Interfaces:
Serializable

public class SerializableCharset extends Object implements Serializable
Serializable wrapper around a 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.

See Also:
  • Method Details

    • getCharset

      public Charset getCharset()
      Returns the wrapped Charset.
      Returns:
      the wrapped Charset
    • forCharset

      public static @PolyNull SerializableCharset forCharset(@PolyNull Charset charset)
      Returns a SerializableCharset wrapping the given Charset, or null if the charset is null.
      Parameters:
      charset - Character set to wrap, or null
      Returns:
      Wrapped charset