Class RespUtil
java.lang.Object
org.infinispan.server.resp.RespUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringascii(byte[] b) static booleancaseInsensitiveAsciiCheck(char expected, byte actual) Checks if target is equal to expected.static longfromUnixTime(long unixTime, TimeService timeService) static booleanisAsciiBytesEquals(byte[] expected, byte[] target) Checks if target is equal to expected.static booleanisAsciiBytesEquals(byte[] expected, String target) Similar toisAsciiBytesEquals(byte[], byte[]), but compares against a string, avoiding allocationsstatic booleanisAsciiChar(byte b) static booleanisAsciiLowercase(byte b) static booleanisAsciiUppercase(byte b) static booleanstatic longtoUnixTime(long time, TimeService timeService) static Stringutf8(byte[] b)
-
Method Details
-
isAsciiBytesEquals
public static boolean isAsciiBytesEquals(byte[] expected, byte[] target) Checks if target is equal to expected. This method is case-insensitive and only works with ASCII characters. The characters on expected must be in uppercase.- Parameters:
expected- : Upper case ASCII characters.target- : ASCII characters to verify.- Returns:
- true if target is equal to expected, false otherwise.
-
isAsciiBytesEquals
Similar toisAsciiBytesEquals(byte[], byte[]), but compares against a string, avoiding allocations- Parameters:
expected- : Upper case ASCII characters.target- : String to verify- Returns:
- true if target is equal to expected, false otherwise.
-
caseInsensitiveAsciiCheck
public static boolean caseInsensitiveAsciiCheck(char expected, byte actual) Checks if target is equal to expected. This method is case-insensitive and only works with ASCII characters. The expected char must be in uppercase.- Parameters:
expected- : Upper case ASCII character.actual- : ASCII character to verify.- Returns:
- true if actual is equal to expected, false otherwise.
-
isAsciiChar
public static boolean isAsciiChar(byte b) -
isAsciiUppercase
public static boolean isAsciiUppercase(byte b) -
isAsciiLowercase
public static boolean isAsciiLowercase(byte b) -
utf8
-
ascii
-
toUnixTime
-
fromUnixTime
-
isWrongTypeError
-