- java.lang.Object
-
- io.github.mmm.binary.codec.Base
-
- io.github.mmm.binary.codec.BaseGeneric
-
-
Constructor Summary
Constructors Constructor Description BaseGeneric(String alphabet)The constructor.BaseGeneric(String alphabet, char paddingChar)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.github.mmm.binary.codec.CoderConfigcreateConfig(String alphabet, char paddingChar)protected byte[]doDecode(String encodedData, BaseFormat format)protected StringdoEncode(byte[] data, BaseFormat format)booleanisCaseSensitive()-
Methods inherited from class io.github.mmm.binary.codec.Base
decode, encode, getAlphabet, toString, withFormat
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.binary.codec.BinaryCodec
decodeInt, decodeLong, decodeShort, encodeInt, encodeLong, encodeShort
-
-
-
-
Method Detail
-
createConfig
protected io.github.mmm.binary.codec.CoderConfig createConfig(String alphabet, char paddingChar)
- Parameters:
alphabet- thealphabet.paddingChar- the optional padding character.- Returns:
- the CoderConfig instance.
-
isCaseSensitive
public boolean isCaseSensitive()
- Specified by:
isCaseSensitivein classBase- Returns:
trueif case-sensitive (e.g. both 'a' and 'A' are used with different meanings),falseotherwise (the case of Latin Ascii letters will be ignored).
-
doEncode
protected String doEncode(byte[] data, BaseFormat format)
- Specified by:
doEncodein classBase- Parameters:
data- the binary data to encode. Neithernullnor empty.format- theBaseFormatto configure the encoding.- Returns:
- the given
dataencoded asString.
-
doDecode
protected byte[] doDecode(String encodedData, BaseFormat format)
-
-