Class BaseEncoding.StandardBaseEncoding

    • Constructor Detail

      • StandardBaseEncoding

        StandardBaseEncoding​(java.lang.String name,
                             java.lang.String alphabetChars,
                             java.lang.Character paddingChar)
      • StandardBaseEncoding

        StandardBaseEncoding​(BaseEncoding.Alphabet alphabet,
                             java.lang.Character paddingChar)
    • Method Detail

      • encodingStream

        @GwtIncompatible
        public java.io.OutputStream encodingStream​(java.io.Writer out)
        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
      • encodeChunkTo

        void encodeChunkTo​(java.lang.Appendable target,
                           byte[] bytes,
                           int off,
                           int len)
                    throws java.io.IOException
        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
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object