Class BaseFormat

    • Method Detail

      • getNewline

        public String getNewline()
        Returns:
        newline the newline sequence (e.g. "\r\n") or null for none (encoded String is a single line).
      • getCharsPerLine

        public int getCharsPerLine()
        Returns:
        the number of characters until another newline will be appended. Will be 0 if newline is null.
      • isFailOnWhitespace

        public boolean isFailOnWhitespace()
        Returns:
        true to fail on whitespace (' ', '\r', or '\n'), false to silently ignore whitespaces.
      • isFailOnMissingPadding

        public boolean isFailOnMissingPadding()
        Returns:
        true to fail if padding (e.g. on Base64) is omitted where applicable, false to silently ignore missing padding.
      • isOmitPadding

        public boolean isOmitPadding()
        Returns:
        true if padding should be omitted, false otherwise (add padding where applicable).
      • ofNewline

        public static BaseFormat ofNewline​(String newline,
                                           int charsPerLine)
        Parameters:
        newline - the newline sequence (e.g. "\n", "\r\n").
        charsPerLine - the number of characters per line until a newline is appended.
        Returns:
        instance of BaseFormat for the given arguments.