public enum ByteUnit extends Enum<ByteUnit>
| Modifier and Type | Method and Description |
|---|---|
long |
convertFrom(long d,
ByteUnit u) |
long |
convertTo(long d,
ByteUnit u) |
double |
toBytes(long d) |
long |
toGiB(long d) |
long |
toKiB(long d) |
long |
toMiB(long d) |
long |
toPiB(long d) |
long |
toTiB(long d) |
static ByteUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ByteUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ByteUnit BYTE
public static final ByteUnit KiB
public static final ByteUnit MiB
public static final ByteUnit GiB
public static final ByteUnit TiB
public static final ByteUnit PiB
public static ByteUnit[] values()
for (ByteUnit c : ByteUnit.values()) System.out.println(c);
public static ByteUnit valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic long convertFrom(long d,
ByteUnit u)
public long convertTo(long d,
ByteUnit u)
public double toBytes(long d)
public long toKiB(long d)
public long toMiB(long d)
public long toGiB(long d)
public long toTiB(long d)
public long toPiB(long d)
Copyright © 2020. All rights reserved.