Package w.util

Enum Class ByteUnit

All Implemented Interfaces:
Serializable, Comparable<ByteUnit>, Constable

public enum ByteUnit extends Enum<ByteUnit>
Author:
whilein
  • Enum Constant Details

    • UNO

      public static final ByteUnit UNO
    • KIBI

      public static final ByteUnit KIBI
    • MEBI

      public static final ByteUnit MEBI
    • GIBI

      public static final ByteUnit GIBI
    • TEBI

      public static final ByteUnit TEBI
  • Method Details

    • values

      public static ByteUnit[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ByteUnit valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toUno

      public double toUno(double bytes)
    • toKibi

      public double toKibi(double bytes)
    • toMebi

      public double toMebi(double bytes)
    • toGibi

      public double toGibi(double bytes)
    • toTebi

      public double toTebi(double bytes)
    • toUno

      public long toUno(long bytes)
    • toKibi

      public long toKibi(long bytes)
    • toMebi

      public long toMebi(long bytes)
    • toGibi

      public long toGibi(long bytes)
    • toTebi

      public long toTebi(long bytes)
    • convert

      public double convert(double bytes, ByteUnit to)
    • convert

      public long convert(long bytes, ByteUnit to)