Package org.infinispan.server.resp
Class Util
java.lang.Object
org.infinispan.server.resp.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancaseInsensitiveAsciiCheck(char expected, byte actual) Checks if target is equal to expected.static longfromUnixTime(long unixTime, org.infinispan.commons.time.TimeService timeService) static booleanisAsciiBytesEquals(byte[] expected, byte[] target) Checks if target is equal to expected.static booleanisAsciiChar(byte b) static booleanisAsciiLowercase(byte b) static booleanisAsciiUppercase(byte b) static longtoUnixTime(long time, org.infinispan.commons.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.
-
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
-
toUnixTime
public static long toUnixTime(long time, org.infinispan.commons.time.TimeService timeService) -
fromUnixTime
public static long fromUnixTime(long unixTime, org.infinispan.commons.time.TimeService timeService)
-