Class BaseGeneric

    • Constructor Detail

      • BaseGeneric

        public BaseGeneric​(String alphabet)
        The constructor.
        Parameters:
        alphabet - the alphabet.
      • BaseGeneric

        public BaseGeneric​(String alphabet,
                           char paddingChar)
        The constructor.
        Parameters:
        alphabet - the alphabet.
        paddingChar - the padding character or -1 for no padding.
    • Method Detail

      • createConfig

        protected io.github.mmm.binary.codec.CoderConfig createConfig​(String alphabet,
                                                                      char paddingChar)
        Parameters:
        alphabet - the alphabet.
        paddingChar - the optional padding character.
        Returns:
        the CoderConfig instance.
      • isCaseSensitive

        public boolean isCaseSensitive()
        Specified by:
        isCaseSensitive in class Base
        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 class Base
        Parameters:
        data - the binary data to encode. Neither null nor empty.
        format - the BaseFormat to configure the encoding.
        Returns:
        the given data encoded as String.
      • doDecode

        protected byte[] doDecode​(String encodedData,
                                  BaseFormat format)
        Specified by:
        doDecode in class Base
        Parameters:
        encodedData - the encoded String. Neither null nor empty.
        format - the BaseFormat to configure the decoding.
        Returns:
        the decoded data as byte array.