public enum FileSizeUnit extends java.lang.Enum<FileSizeUnit>
| Modifier and Type | Method and Description |
|---|---|
int |
getBytes()
Returns the number of bytes in this unit
|
static FileSizeDTO |
nearestFileSize(long length)
Returns a FileSizeDTO containing the nearest unit for the given length in bytes.
|
static FileSizeUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FileSizeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileSizeUnit B
public static final FileSizeUnit K
public static final FileSizeUnit M
public static FileSizeUnit[] values()
for (FileSizeUnit c : FileSizeUnit.values()) System.out.println(c);
public static FileSizeUnit 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 FileSizeDTO nearestFileSize(long length)
public int getBytes()