Class ConverterUtils


  • public final class ConverterUtils
    extends java.lang.Object
    Static utility functions for converters.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long GB  
      static long KB  
      static long MB  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long getByteCount​(java.lang.String memory)
      Convert the memory specification string from GB, MB, or KB to a byte count value.
      static DistanceUnits getDistanceUnits​(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute)
      Parse a DistanceUnits value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 AttivioException
        Convert the memory specification string from GB, MB, or KB to a byte count value.
        Parameters:
        memory - a String containing 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 formatted
        java.lang.NullPointerException - when the provided argument is null