|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.common.util.SimpleFormatter
public class SimpleFormatter
Format time, bytes, counts, dates, and transfer rates into human friendly form
Constructor Summary | |
---|---|
SimpleFormatter()
|
Method Summary | |
---|---|
String |
getCount(long count)
Return a formatted count |
NumberFormat |
getCountFormatter()
|
String |
getDate(Date date)
Return a formatted date |
String |
getDate(long millis)
Return a formatted date |
SimpleDateFormat |
getDateFormatter()
|
String |
getFormattedSize(long bytes,
Size size)
|
NumberFormat |
getLargeSizeFormatter()
|
String |
getRate(long millis,
long bytes)
Given a number of bytes and the number of milliseconds it took to transfer that number of bytes, return bytes/s, KB/s, MB/s, GB/s, TB/s, PB/s, or EB/s as appropriate |
NumberFormat |
getRateFormatter()
|
String |
getSize(long bytes)
Given a number of bytes return bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes as appropriate. |
String |
getSize(long bytes,
Size unitOfMeasure)
Given a number of bytes return a string formatted into the unit of measure indicated |
Size |
getSizeEnum(double bytes)
|
NumberFormat |
getSizeFormatter()
|
String |
getTime(long millis)
Given milliseconds, return milliseconds, seconds, minutes, hours, days, years, decades, or centuries as appropriate. |
NumberFormat |
getTimeFormatter()
|
Date |
parseDate(String date)
Parse a date from the string. |
void |
setCountFormatter(NumberFormat countFormatter)
|
void |
setDateFormatter(SimpleDateFormat dateFormatter)
|
void |
setLargeSizeFormatter(NumberFormat sizeFormatter)
|
void |
setRateFormatter(NumberFormat rateFormatter)
|
void |
setSizeFormatter(NumberFormat smallSizeFormatter)
|
void |
setTimeFormatter(NumberFormat timeFormatter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleFormatter()
Method Detail |
---|
public Date parseDate(String date)
public String getDate(long millis)
public String getDate(Date date)
public String getRate(long millis, long bytes)
public String getCount(long count)
count
public String getTime(long millis)
public String getSize(long bytes)
public String getSize(long bytes, Size unitOfMeasure)
public String getFormattedSize(long bytes, Size size)
public Size getSizeEnum(double bytes)
public NumberFormat getLargeSizeFormatter()
public void setLargeSizeFormatter(NumberFormat sizeFormatter)
public NumberFormat getTimeFormatter()
public void setTimeFormatter(NumberFormat timeFormatter)
public NumberFormat getRateFormatter()
public void setRateFormatter(NumberFormat rateFormatter)
public NumberFormat getSizeFormatter()
public void setSizeFormatter(NumberFormat smallSizeFormatter)
public NumberFormat getCountFormatter()
public void setCountFormatter(NumberFormat countFormatter)
public SimpleDateFormat getDateFormatter()
public void setDateFormatter(SimpleDateFormat dateFormatter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |