Class FilterCodecUtils


  • public class FilterCodecUtils
    extends java.lang.Object
    Utility class for codec related functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.lang.String decodeString​(@NotNull java.lang.StringBuilder sb)
      Decodes a string from a string builder.
      static void encodeString​(@NotNull java.lang.StringBuilder sb, @NotNull java.lang.String string)
      Encodes a string configuration to a string builder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • encodeString

        public static void encodeString​(@NotNull
                                        @NotNull java.lang.StringBuilder sb,
                                        @NotNull
                                        @NotNull java.lang.String string)
        Encodes a string configuration to a string builder.
        Parameters:
        sb - the string builder to append to
        string - the string to encode
      • decodeString

        @NotNull
        public static @NotNull java.lang.String decodeString​(@NotNull
                                                             @NotNull java.lang.StringBuilder sb)
        Decodes a string from a string builder. Decoding stops at the end of the string or at the first unescaped "," or ")" character.
        Parameters:
        sb - the string buiilder to decode; the decoded string will be removed
        Returns:
        the string
        Throws:
        java.lang.NumberFormatException - if decoding fails
        java.lang.StringIndexOutOfBoundsException - if decoding fails