Class BaseEncoding.SeparatedBaseEncoding

    • Field Detail

      • separator

        private final java.lang.String separator
      • afterEveryChars

        private final int afterEveryChars
    • Constructor Detail

      • SeparatedBaseEncoding

        SeparatedBaseEncoding​(BaseEncoding delegate,
                              java.lang.String separator,
                              int afterEveryChars)
    • Method Detail

      • encodingStream

        @GwtIncompatible
        public java.io.OutputStream encodingStream​(java.io.Writer output)
        Description copied from class: BaseEncoding
        Returns an OutputStream that encodes bytes using this encoding into the specified Writer. When the returned OutputStream is closed, so is the backing Writer.
        Specified by:
        encodingStream in class BaseEncoding
      • encodeTo

        void encodeTo​(java.lang.Appendable target,
                      byte[] bytes,
                      int off,
                      int len)
               throws java.io.IOException
        Specified by:
        encodeTo in class BaseEncoding
        Throws:
        java.io.IOException
      • canDecode

        public boolean canDecode​(java.lang.CharSequence chars)
        Description copied from class: BaseEncoding
        Determines whether the specified character sequence is a valid encoded string according to this encoding.
        Specified by:
        canDecode in class BaseEncoding
      • withPadChar

        public BaseEncoding withPadChar​(char padChar)
        Description copied from class: BaseEncoding
        Returns an encoding that behaves equivalently to this encoding, but uses an alternate character for padding.
        Specified by:
        withPadChar in class BaseEncoding
      • withSeparator

        public BaseEncoding withSeparator​(java.lang.String separator,
                                          int afterEveryChars)
        Description copied from class: BaseEncoding
        Returns an encoding that behaves equivalently to this encoding, but adds a separator string after every n characters. Any occurrences of any characters that occur in the separator are skipped over in decoding.
        Specified by:
        withSeparator in class BaseEncoding
      • upperCase

        public BaseEncoding upperCase()
        Description copied from class: BaseEncoding
        Returns an encoding that behaves equivalently to this encoding, but encodes and decodes with uppercase letters. Padding and separator characters remain in their original case.
        Specified by:
        upperCase in class BaseEncoding
      • lowerCase

        public BaseEncoding lowerCase()
        Description copied from class: BaseEncoding
        Returns an encoding that behaves equivalently to this encoding, but encodes and decodes with lowercase letters. Padding and separator characters remain in their original case.
        Specified by:
        lowerCase in class BaseEncoding
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object