org.kuali.maven.wagon
Class SimpleFormatter
java.lang.Object
org.kuali.maven.wagon.SimpleFormatter
public class SimpleFormatter
- extends Object
Very simple formatter for formatting a few things - transfer rate, elapsed time, bytes
- Since:
- May 27, 2010 6:46:17 PM
- Author:
- Jeff Caddel
Method Summary |
String |
getRate(long millis,
long bytes)
Given milliseconds and bytes return kilobytes per second |
String |
getSize(long bytes)
Given bytes, return kilobytes if it is less than a megabyte, megabytes if it is less than a gigabyte, otherwise
gigabytes |
String |
getTime(long millis)
Given milliseconds, return seconds or minutes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KB
private static final double KB
- See Also:
- Constant Field Values
MB
private static final double MB
- See Also:
- Constant Field Values
GB
private static final double GB
- See Also:
- Constant Field Values
ONE_SECOND
private static final double ONE_SECOND
- See Also:
- Constant Field Values
ONE_MINUTE
private static final double ONE_MINUTE
- See Also:
- Constant Field Values
FIFTEEN_MINUTES
private static final double FIFTEEN_MINUTES
- See Also:
- Constant Field Values
sizeFormatter
NumberFormat sizeFormatter
timeFormatter
NumberFormat timeFormatter
rateFormatter
NumberFormat rateFormatter
SimpleFormatter
public SimpleFormatter()
getRate
public String getRate(long millis,
long bytes)
- Given milliseconds and bytes return kilobytes per second
getTime
public String getTime(long millis)
- Given milliseconds, return seconds or minutes
getSize
public String getSize(long bytes)
- Given bytes, return kilobytes if it is less than a megabyte, megabytes if it is less than a gigabyte, otherwise
gigabytes
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.