Package com.mchange.lang
Class FloatUtils
- java.lang.Object
-
- com.mchange.lang.FloatUtils
-
public final class FloatUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FloatUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
byteArrayFromFloat(float f)
static float
floatFromByteArray(byte[] b, int offset)
static java.lang.String
floatToString(float f, int precision)
static float
parseFloat(java.lang.String fStr)
useful in Java1.1 environments, where Float.parseFloat is not defined...static float
parseFloat(java.lang.String fStr, float dflt)
-
-
-
Method Detail
-
byteArrayFromFloat
public static byte[] byteArrayFromFloat(float f)
-
floatFromByteArray
public static float floatFromByteArray(byte[] b, int offset)
-
parseFloat
public static float parseFloat(java.lang.String fStr, float dflt)
-
parseFloat
public static float parseFloat(java.lang.String fStr) throws java.lang.NumberFormatException
useful in Java1.1 environments, where Float.parseFloat is not defined...- Throws:
java.lang.NumberFormatException
-
floatToString
public static java.lang.String floatToString(float f, int precision)
-
-