public enum ByteUnitType extends Enum<ByteUnitType>
| Modifier and Type | Class and Description |
|---|---|
static class |
ByteUnitType.ByteUnitSystem |
| Enum Constant and Description |
|---|
BYTE |
GB |
GiB |
KB |
KiB |
MB |
MiB |
PB |
PiB |
TB |
TiB |
| Modifier and Type | Field and Description |
|---|---|
static ByteUnitType[] |
BIN_SORTED_ASC |
| Modifier and Type | Method and Description |
|---|---|
static ByteUnitType[] |
getAscValues(ByteUnitType.ByteUnitSystem byteUnitSystem) |
io.datarouter.bytes.ByteUnitType.ByteUnitName |
getByteUnitName() |
long |
getNumBytes() |
static double |
getNumBytes(long numBytes,
ByteUnitType toByteUnit) |
String |
getNumBytesDisplay(long value) |
static String |
getNumBytesDisplay(long value,
ByteUnitType toByteUnit) |
long |
toBytes(long input) |
int |
toBytesInt(long input) |
static ByteUnitType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ByteUnitType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ByteUnitType BYTE
public static final ByteUnitType KB
public static final ByteUnitType MB
public static final ByteUnitType GB
public static final ByteUnitType TB
public static final ByteUnitType PB
public static final ByteUnitType KiB
public static final ByteUnitType MiB
public static final ByteUnitType GiB
public static final ByteUnitType TiB
public static final ByteUnitType PiB
public static final ByteUnitType[] BIN_SORTED_ASC
public static ByteUnitType[] values()
for (ByteUnitType c : ByteUnitType.values()) System.out.println(c);
public static ByteUnitType 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 static ByteUnitType[] getAscValues(ByteUnitType.ByteUnitSystem byteUnitSystem)
public static String getNumBytesDisplay(long value, ByteUnitType toByteUnit)
public String getNumBytesDisplay(long value)
public static double getNumBytes(long numBytes,
ByteUnitType toByteUnit)
public long getNumBytes()
public io.datarouter.bytes.ByteUnitType.ByteUnitName getByteUnitName()
public long toBytes(long input)
public int toBytesInt(long input)
Copyright © 2009–2021. All rights reserved.