public enum ByteSizeUnit extends java.lang.Enum<ByteSizeUnit>
Enum Constant and Description |
---|
BYTES |
EXA_BYTES |
GIGA_BYTES |
KILO_BYTES |
MEGA_BYTES |
PETA_BYTES |
TERA_BYTES |
Modifier and Type | Method and Description |
---|---|
static ByteSizeUnit |
findByPrefix(java.lang.String str)
Returns the ByteSiteUnit enum value that matches the given string.
|
java.math.BigDecimal |
getBytesFactor()
Returns the multiplication factor for this unit to
convert a corresponding value to its number of bytes.
|
java.lang.String |
getCommonnName()
Returns the commonly used (but incorrect) name of the unit.
|
java.lang.String |
getCommonPrefix()
Returns the commonly used (but incorrect) short name of the unit.
|
long |
getFactor()
Returns the multiplication factor for this unit to
convert a corresponding value to its number of bytes
as long value.
|
java.lang.String |
getIEEE1541Name()
Returns the standardized IEEE 1541 name of the unit.
|
java.lang.String |
getIEEE1541Prefix()
Returns the standardized IEEE 1541 prefix of the unit.
|
int |
getPowerOf1024()
Returns the power of 1024 (bytes) this unit represents.
|
static ByteSizeUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ByteSizeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ByteSizeUnit BYTES
public static final ByteSizeUnit KILO_BYTES
public static final ByteSizeUnit MEGA_BYTES
public static final ByteSizeUnit GIGA_BYTES
public static final ByteSizeUnit TERA_BYTES
public static final ByteSizeUnit PETA_BYTES
public static final ByteSizeUnit EXA_BYTES
public static ByteSizeUnit[] values()
for (ByteSizeUnit c : ByteSizeUnit.values()) System.out.println(c);
public static ByteSizeUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static ByteSizeUnit findByPrefix(java.lang.String str)
str
- The prefix value to be used for the look-up.public int getPowerOf1024()
public java.lang.String getCommonnName()
public java.lang.String getCommonPrefix()
public java.lang.String getIEEE1541Name()
public java.lang.String getIEEE1541Prefix()
public java.math.BigDecimal getBytesFactor()
public long getFactor()