|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.common.aws.s3.SimpleFormatter
public class SimpleFormatter
Format time, bytes, counts, and transfer rate into human friendly form
Constructor Summary | |
---|---|
SimpleFormatter()
|
Method Summary | |
---|---|
String |
getCount(long count)
Return a formatted count |
String |
getDate(Date date)
Return a formatted date |
String |
getDate(long millis)
Return a formatted date |
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 size)
Given a number of bytes return bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes as appropriate. |
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()
|
protected boolean |
needsSpaceBeforeLabel(Size size)
|
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 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 size)
protected boolean needsSpaceBeforeLabel(Size size)
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |