Class StringCodecFactory.IdentEncoding

  • All Implemented Interfaces:
    StringCodec
    Enclosing class:
    StringCodecFactory

    public static final class StringCodecFactory.IdentEncoding
    extends Object
    implements StringCodec
    Usage of this class discouraged. If should only be used by frameworks to initialize the StringCodecFactory instance.

    Performs an identical encoding, i.e. returns an identical string for encoding and decoding.

    • Constructor Detail

      • IdentEncoding

        public IdentEncoding()
    • Method Detail

      • encode

        public String encode​(String plain)
        Description copied from interface: StringCodec
        Encodes a string of characters.
        Specified by:
        encode in interface StringCodec
        Parameters:
        plain - the string to encode
        Returns:
        the encoded string
      • decode

        public String decode​(String encoded)
        Description copied from interface: StringCodec
        Decodes a string of characters. Some encoding strategies are one-way, in which case the decoding might return null.
        Specified by:
        decode in interface StringCodec
        Parameters:
        encoded - the previously encoded string
        Returns:
        the decoded string or null if no decoding is possible