Package com.helger.base.codec.impl
Class RFC1522BCodec
java.lang.Object
com.helger.base.codec.impl.AbstractRFC1522Codec
com.helger.base.codec.impl.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.base.codec.impl.AbstractRFC1522Codec
POSTFIX, PREFIX, SEP -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor with the UTF-8 charset.RFC1522BCodec(@NonNull Charset aCharset) Constructor which allows for the selection of a default charset -
Method Summary
Modifier and TypeMethodDescriptionprotected byte @Nullable []getDecoded(byte @Nullable [] aEncodedBuffer, int nOfs, int nLen) protected byte @Nullable []getEncoded(byte @Nullable [] aDecodedBuffer, int nOfs, int nLen) protected StringReturns the codec name (referred to as encoding in the RFC 1522).Methods inherited from class com.helger.base.codec.impl.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
@ReturnsMutableCopy protected byte @Nullable [] getEncoded(byte @Nullable [] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen) - Specified by:
getEncodedin classAbstractRFC1522Codec
-
getDecoded
@ReturnsMutableCopy protected byte @Nullable [] getDecoded(byte @Nullable [] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen) - Specified by:
getDecodedin classAbstractRFC1522Codec
-