|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.makumba.commons.ReadableFormatter
public class ReadableFormatter
Formats argument in a readable (meaningful) way
| Constructor Summary | |
|---|---|
ReadableFormatter()
|
|
| Method Summary | |
|---|---|
static Object[] |
getUnitAndValue(long secs)
Compute a time unit and value of that time unit from a given time in seconds |
static String |
readableAge(long milis)
Formats lentgh of time periods in a nice format |
static String |
readableBytes(long byteSize)
Formats byte size in nice format |
static String |
readableBytes(String byteSize)
Formats byte size in nice format - a wrapper method |
static String |
readableDate(Date date)
prints date in nice format - only relevant parts Skips year if current, shows time if today... |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadableFormatter()
| Method Detail |
|---|
public static String readableBytes(String byteSize)
byteSize - String representing the byte size
byteSize is not a number byteSize is nullreadableBytes(long)public static String readableBytes(long byteSize)
byteSize - the size in bytes to format
readableBytes(String)public static String readableAge(long milis)
milis - a time difference in milli-seconds to format
public static Object[] getUnitAndValue(long secs)
public static String readableDate(Date date)
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||