| Modifier and Type | Method and Description |
|---|---|
static Charset |
charset(Codec codec)
Figures the content transfer charset which is used by the given codec.
|
static <T> T |
clone(T object)
Returns a clone of the given object using a new
SerializationCodec. |
static <T> T |
clone(T object,
Codec codec)
Returns a clone of the given object using the given codec.
|
static Charset |
contentTransferCharset(Codec codec)
Figures the content transfer charset which is used by the given codec.
|
@CheckForNull public static Charset charset(Codec codec)
contentTransferCharset(net.java.truelicense.core.codec.Codec).
If an IllegalArgumentException is thrown, then it returns
null.codec - the codec to test.null if the codec doesn't produce text or specifies an
invalid charset name or an unknown charset.public static <T> T clone(T object)
throws Exception
SerializationCodec.Exceptionpublic static <T> T clone(T object,
Codec codec)
throws Exception
Exceptionpublic static Charset contentTransferCharset(Codec codec)
"7bit", "quoted-printable" or "base64"
(ignoring case), then the returned charset is US-ASCII.
"8bit"
(ignoring case), then the codec's Content-Type
gets tested:
charset parameter
(ignoring case), then an attempt is made to load this charset.
Upon success, this charset gets returned.
charset parameter,
then UTF-8 gets returned.
This ensures compatibility with JSON.
IllegalArgumentException gets
thrown in order to specify that the codec doesn't produce text or
specifies an invalid charset name or an unknown charset.
codec - the codec to test.IllegalCharsetNameException - if the specified charset name is
invalid.UnsupportedCharsetException - if the specified charset is unknown.BinaryCodecException - if the codec doesn't produce text.Copyright © 2005–2017 Schlichtherle IT Services. All rights reserved.