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 booleanisFloatValid(double value) static byte[]toByteArray(long value) static byte[]toByteArray(Number value) static doubletoDouble(byte[] argument) static doubletoDouble(byte[] argument, int offset) Parse Double, removing an offset from the argumentstatic inttoInt(byte[] argument) static longtoLong(byte[] argument) static StringtoNumberString(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)
-