Package com.helger.commons.codec
Class RFC1522BCodec
- java.lang.Object
-
- com.helger.commons.codec.AbstractRFC1522Codec
-
- com.helger.commons.codec.RFC1522BCodec
-
public class RFC1522BCodec extends AbstractRFC1522Codec
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.
-
-
Field Summary
-
Fields inherited from class com.helger.commons.codec.AbstractRFC1522Codec
POSTFIX, PREFIX, SEP
-
-
Constructor Summary
Constructors Constructor Description RFC1522BCodec()Default constructor with the UTF-8 charset.RFC1522BCodec(Charset aCharset)Constructor which allows for the selection of a default charset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]getDecoded(byte[] aEncodedBuffer, int nOfs, int nLen)protected byte[]getEncoded(byte[] aDecodedBuffer, int nOfs, int nLen)protected StringgetRFC1522Encoding()Returns the codec name (referred to as encoding in the RFC 1522).-
Methods inherited from class com.helger.commons.codec.AbstractRFC1522Codec
getCharset, getDecoded, getEncoded
-
-
-
-
Method Detail
-
getRFC1522Encoding
protected String 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
-
-