|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<ByteSizeUnit>
org.pfsw.text.ByteSizeUnit
public enum ByteSizeUnit
This enum provides several memory size units with an associated factor that is useful to calculate the number of bytes from a value given in a different memory size unit. See also http://en.wikipedia.org/wiki/IEEE_1541-2002
| Enum Constant Summary | |
|---|---|
BYTES
|
|
EXA_BYTES
|
|
GIGA_BYTES
|
|
KILO_BYTES
|
|
MEGA_BYTES
|
|
PETA_BYTES
|
|
TERA_BYTES
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
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
| Method Detail |
|---|
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 name
java.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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||