|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackboard.util.UnitUtil
public class UnitUtil
This class contains methods for formatting units (bytes,kilobytes,etc)
| Constructor Summary | |
|---|---|
UnitUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
toKilobytes(long bytes)
This static method converts the passed in number of bytes into a kilobyte string grouping digits with locale-dependant thousand separator and with "KB" locale-dependant unit at the end. |
static java.lang.String |
toLocalizedInteger(long value)
This static method converts the passed in number into a localizable representation of an integer, with digit grouping using locale dependant separators. |
static java.lang.String |
toUnitbytes(long bytes)
Converts the passed in number of bytes into a byte-size string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnitUtil()
| Method Detail |
|---|
public static java.lang.String toLocalizedInteger(long value)
value - the number to convert to a numeric String.
public static java.lang.String toKilobytes(long bytes)
bytes - the number of bytes to convert to a kilobyte String.
bytes argument evaluates to, with "KB" appended
at the end. If the input value is negative, the string
returned will be "? KB".public static java.lang.String toUnitbytes(long bytes)
bytes - the number of bytes to convert to a size String.
bytes argument evaluates to, with
"KB"/"MB"/"GB"/TB" appended at the end. If the input value is
negative, the string returned will be "? KB".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||