- 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.CoderConfig
createConfig(String alphabet, char paddingChar)
protected byte[]
doDecode(String encodedData, BaseFormat format)
protected String
doEncode(byte[] data, BaseFormat format)
boolean
isCaseSensitive()
-
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:
isCaseSensitive
in classBase
- Returns:
true
if case-sensitive (e.g. both 'a' and 'A' are used with different meanings),false
otherwise (the case of Latin Ascii letters will be ignored).
-
doEncode
protected String doEncode(byte[] data, BaseFormat format)
- Specified by:
doEncode
in classBase
- Parameters:
data
- the binary data to encode. Neithernull
nor empty.format
- theBaseFormat
to configure the encoding.- Returns:
- the given
data
encoded asString
.
-
doDecode
protected byte[] doDecode(String encodedData, BaseFormat format)
-
-