Class ArgumentUtils
java.lang.Object
org.infinispan.server.resp.commands.ArgumentUtils
Utility class to transform byte[] arguments.
- Since:
- 15.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isFloatValid
(double value) static byte[]
toByteArray
(long value) static byte[]
toByteArray
(Number value) static double
toDouble
(byte[] argument) static double
toDouble
(byte[] argument, int offset) Parse Double, removing an offset from the argumentstatic int
toInt
(byte[] argument) static long
toLong
(byte[] argument) static String
toNumberString
(byte[] argument) Numbers are always ASCII.
-
Method Details
-
toNumberString
Numbers are always ASCII.- Parameters:
argument
- , byte[]- Returns:
- String
-
toDouble
public static double toDouble(byte[] argument, int offset) Parse Double, removing an offset from the argument- Parameters:
argument
-offset
- , starting from- Returns:
- double value
-
toDouble
public static double toDouble(byte[] argument) -
toLong
public static long toLong(byte[] argument) -
toInt
public static int toInt(byte[] argument) -
toByteArray
public static byte[] toByteArray(long value) -
toByteArray
-
isFloatValid
public static boolean isFloatValid(double value)
-