Class Strings

java.lang.Object
pcap.common.util.Strings

@Inclubating
public final class Strings
extends Object
Author:
Ardika Rommy Sanjaya
  • Field Details

  • Method Details

    • empty

      public static boolean empty​(CharSequence charSequence)
    • blank

      public static boolean blank​(CharSequence charSequence)
    • hex

      public static String hex​(byte value)
      Byte to hex value.
      Parameters:
      value - value.
      Returns:
      hex format.
      Since:
      1.0.0
    • hex

      public static String hex​(byte[] data)
      Byte array to hex stream.
      Parameters:
      data - byte array.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(byte[] data, int offset, int length)
      Byte array to hex stream.
      Parameters:
      data - byte array.
      offset - offset.
      length - length.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(short value)
      Short to hex stream.
      Parameters:
      value - short array.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(short[] values)
      Short array to hex stream.
      Parameters:
      values - short array.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(short[] data, int offset, int length)
      Short array to hex stream.
      Parameters:
      data - short array.
      offset - offset.
      length - length.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(int value)
      Int to hex stream.
      Parameters:
      value - integer value.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(int[] values)
      Int array to hex stream.
      Parameters:
      values - int array.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(int[] data, int offset, int length)
      Int array to hex stream.
      Parameters:
      data - int array.
      offset - offset.
      length - length.
      Returns:
      hex stream.
      Since:
      1.0.0
    • hex

      public static String hex​(float value)
      Float to hex stream.
      Parameters:
      value - float array.
      Returns:
      hex stream.
    • hex

      public static String hex​(float[] data)
      Float array to hex stream.
      Parameters:
      data - float array.
      Returns:
      hex stream.
    • hex

      public static String hex​(float[] data, int offset, int length)
      Float array to hex stream.
      Parameters:
      data - float array.
      offset - offset.
      length - length.
      Returns:
      hex stream.
    • hex

      public static String hex​(long value)
      Long to hex stream.
      Parameters:
      value - long.
      Returns:
      hex stream.
    • hex

      public static String hex​(long[] data)
      Long array to hex stream.
      Parameters:
      data - long array.
      Returns:
      hex stream.
    • hex

      public static String hex​(long[] data, int offset, int length)
      Long array to hex stream.
      Parameters:
      data - long array.
      offset - offset.
      length - length.
      Returns:
      hex stream.
    • hex

      public static String hex​(double value)
      Double to hex stream.
      Parameters:
      value - double value.
      Returns:
      hex stream.
    • hex

      public static String hex​(double[] data)
      Double array to hex stream.
      Parameters:
      data - double array.
      Returns:
      hex stream.
    • hex

      public static String hex​(double[] data, int offset, int length)
      Double array to hex stream.
      Parameters:
      data - double array.
      offset - offset.
      length - length.
      Returns:
      hex stream.
    • hex

      public static String hex​(String value)
      String to hex string.
      Parameters:
      value - string.
      Returns:
      hex string.
    • hex

      public static String hex​(String value, Charset charset)
      String hex string.
      Parameters:
      value - string.
      charset - charset.
      Returns:
      hex string.
    • toStringBuilder

      public static Strings.ToStringBuilder toStringBuilder​(Object obj)
    • toStringJsonBuilder

      public static Strings.ToStringBuilder toStringJsonBuilder​(Object obj)
    • toStringBuilder

      public static Strings.ToStringBuilder toStringBuilder​(Object obj, String start, String end, String delimiter, String separator, boolean quoteString)
    • toStringBuilder

      public static Strings.ToStringBuilder toStringBuilder​(String name, String start, String end, String delimiter, String separator, boolean quoteString)