Package com.helger.commons.codec
Class RFC1522BCodec
java.lang.Object
com.helger.commons.codec.AbstractRFC1522Codec
com.helger.commons.codec.RFC1522BCodec
Identical to the Base64 encoding defined by
RFC 1521 and allows a
character set to be specified.
RFC 1522 describes techniques to allow the encoding of non-ASCII text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message handling software.
This class is immutable and thread-safe.
- See Also:
-
Field Summary
Fields inherited from class com.helger.commons.codec.AbstractRFC1522Codec
POSTFIX, PREFIX, SEP -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor with the UTF-8 charset.RFC1522BCodec(Charset aCharset) Constructor which allows for the selection of a default charset -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]getDecoded(byte[] aEncodedBuffer, int nOfs, int nLen) protected byte[]getEncoded(byte[] aDecodedBuffer, int nOfs, int nLen) protected StringReturns the codec name (referred to as encoding in the RFC 1522).Methods inherited from class com.helger.commons.codec.AbstractRFC1522Codec
getCharset, getDecoded, getEncoded
-
Constructor Details
-
RFC1522BCodec
public RFC1522BCodec()Default constructor with the UTF-8 charset. -
RFC1522BCodec
Constructor which allows for the selection of a default charset- Parameters:
aCharset- the default string charset to use.
-
-
Method Details
-
getRFC1522Encoding
Description copied from class:AbstractRFC1522CodecReturns the codec name (referred to as encoding in the RFC 1522).- Specified by:
getRFC1522Encodingin classAbstractRFC1522Codec- Returns:
- name of the codec
-
getEncoded
@Nullable @ReturnsMutableCopy protected byte[] getEncoded(@Nullable byte[] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen) - Specified by:
getEncodedin classAbstractRFC1522Codec
-
getDecoded
@Nullable @ReturnsMutableCopy protected byte[] getDecoded(@Nullable byte[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen) - Specified by:
getDecodedin classAbstractRFC1522Codec
-