org.kuali.maven.wagon
Class SimpleFormatter

java.lang.Object
  extended by 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

Constructor Summary
SimpleFormatter()
           
 
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
 

Constructor Detail

SimpleFormatter

public SimpleFormatter()
Method Detail

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 © 2010-2012 The Kuali Foundation. All Rights Reserved.