Package com.attivio.util.serialization
Class ConverterUtils
- java.lang.Object
-
- com.attivio.util.serialization.ConverterUtils
-
public final class ConverterUtils extends java.lang.ObjectStatic utility functions for converters.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetByteCount(java.lang.String memory)Convert the memory specification string from GB, MB, or KB to a byte count value.static DistanceUnitsgetDistanceUnits(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute)Parse a DistanceUnits value.
-
-
-
Field Detail
-
KB
public static final long KB
- See Also:
- Constant Field Values
-
MB
public static final long MB
- See Also:
- Constant Field Values
-
GB
public static final long GB
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDistanceUnits
public static DistanceUnits getDistanceUnits(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute)
Parse a DistanceUnits value.
-
getByteCount
public static long getByteCount(java.lang.String memory) throws AttivioExceptionConvert the memory specification string from GB, MB, or KB to a byte count value.- Parameters:
memory- aStringcontaining a number value optionally ending with a single character unit indication (G, M, or K).- Returns:
- the number of bytes
- Throws:
AttivioException- when the provided argument is improperly formattedjava.lang.NullPointerException- when the provided argument isnull
-
-