Class MemorySize


  • @Deprecated
    public final class MemorySize
    extends Capacity
    Deprecated.
    Since 5.1, Capacity should be used instead.
    MemorySize represents a memory size with given value and MemoryUnit.
    Since:
    3.4
    See Also:
    MemoryUnit, Capacity
    • Constructor Detail

      • MemorySize

        public MemorySize​(long value)
        Deprecated.
      • MemorySize

        public MemorySize​(long value,
                          MemoryUnit unit)
        Deprecated.
    • Method Detail

      • parse

        @Deprecated
        public static MemorySize parse​(java.lang.String value)
        Deprecated.
        since 5.1, use Capacity.parse(String) instead.
        Parses string representation of a memory size value. Value may end with one of suffixes;
        • 'k' or 'K' for 'kilo',
        • 'm' or 'M' for 'mega',
        • 'g' or 'G' for 'giga'.

        Default unit is bytes.

        Examples: 12345, 12345m, 12345K, 123456G

      • parse

        @Deprecated
        public static MemorySize parse​(java.lang.String value,
                                       MemoryUnit defaultUnit)
        Deprecated.
        since 5.1, use Capacity.parse(String, MemoryUnit) instead
        Parses string representation of a memory size value. Value may end with one of suffixes;
        • 'k' or 'K' for 'kilo',
        • 'm' or 'M' for 'mega',
        • 'g' or 'G' for 'giga'.

        Uses default unit if value does not contain unit information.

        Examples: 12345, 12345m, 12345K, 123456G