Package | Description |
---|---|
com.kamontat.constants | |
com.kamontat.object | |
com.kamontat.utilities |
Modifier and Type | Method and Description |
---|---|
SizeUnit |
SizeUnit.setType(SizeUnitType type)
set new type and return this
|
static SizeUnit |
SizeUnit.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SizeUnit |
SizeUnit.valueOf(String s,
SizeUnitType type)
get string that must contain unit of file size and convert it to
SizeUnit |
static SizeUnit[] |
SizeUnit.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
BigDecimal |
SizeUnit.to(BigDecimal number,
int decimalPoint,
SizeUnit unit)
convert this unit to any unit that you pass from the parameter
and return the decimal number in decimal point number Example: decimalPoint=2 the return value will compute until 2 number after pass dot (##.XX) |
BigDecimal |
SizeUnit.to(BigDecimal number,
SizeUnit unit)
same with
to(BigDecimal, int, SizeUnit) but pass int as Size.SIZE_SCALE |
Modifier and Type | Method and Description |
---|---|
SizeUnit |
Size.getUnit() |
Modifier and Type | Method and Description |
---|---|
Size |
Size.convertTo(SizeUnit unit)
convert current unit to newUnit
|
Constructor and Description |
---|
Size(BigDecimal size,
SizeUnit unit,
SizeUnitType type) |
Modifier and Type | Method and Description |
---|---|
static Size |
SizeUtil.getSize(long size,
SizeUnit unit)
get size with default type(
SizeUnitType.NON_SI ) call SizeUtil.getSize(long, SizeUnit, SizeUnitType) method |
static Size |
SizeUtil.getSize(long size,
SizeUnit unit,
SizeUnitType type)
get file size
|
Copyright © 2017. All rights reserved.