org.gudy.azureus2.pluginsimpl.local.utils
Class FormattersImpl
java.lang.Object
  
org.gudy.azureus2.pluginsimpl.local.utils.FormattersImpl
- All Implemented Interfaces: 
 - Formatters
 
public class FormattersImpl
- extends java.lang.Object
- implements Formatters
  
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
FormattersImpl
public FormattersImpl()
formatByteCountToKiBEtc
public java.lang.String formatByteCountToKiBEtc(long bytes)
- Specified by:
 formatByteCountToKiBEtc in interface Formatters
 
 
formatByteCountToKiBEtcPerSec
public java.lang.String formatByteCountToKiBEtcPerSec(long bytes)
- Specified by:
 formatByteCountToKiBEtcPerSec in interface Formatters
 
 
formatPercentFromThousands
public java.lang.String formatPercentFromThousands(long thousands)
- Specified by:
 formatPercentFromThousands in interface Formatters
 
 
formatByteArray
public java.lang.String formatByteArray(byte[] data,
                                        boolean no_spaces)
- Specified by:
 formatByteArray in interface Formatters
 
 
encodeBytesToString
public java.lang.String encodeBytesToString(byte[] bytes)
- Specified by:
 encodeBytesToString in interface Formatters
 
 
decodeBytesFromString
public byte[] decodeBytesFromString(java.lang.String str)
- Specified by:
 decodeBytesFromString in interface Formatters
 
 
formatDate
public java.lang.String formatDate(long millis)
- Specified by:
 formatDate in interface Formatters
 
 
formatTimeOnly
public java.lang.String formatTimeOnly(long millis)
- Specified by:
 formatTimeOnly in interface Formatters
 
 
formatTimeOnly
public java.lang.String formatTimeOnly(long millis,
                                       boolean with_secs)
- Specified by:
 formatTimeOnly in interface Formatters
 
 
formatDateOnly
public java.lang.String formatDateOnly(long millis)
- Specified by:
 formatDateOnly in interface Formatters
 
 
formatTimeFromSeconds
public java.lang.String formatTimeFromSeconds(long seconds)
- Specified by:
 formatTimeFromSeconds in interface Formatters
 
 
formatETAFromSeconds
public java.lang.String formatETAFromSeconds(long seconds)
- Description copied from interface: 
Formatters 
- Format seconds remaining into an ETA value.
- Specified by:
 formatETAFromSeconds in interface Formatters
 
- Returns:
 
 
 
bEncode
public byte[] bEncode(java.util.Map map)
               throws java.io.IOException
- Specified by:
 bEncode in interface Formatters
 
- Throws:
 java.io.IOException
 
bDecode
public java.util.Map bDecode(byte[] data)
                      throws java.io.IOException
- Specified by:
 bDecode in interface Formatters
 
- Throws:
 java.io.IOException
 
base32Encode
public java.lang.String base32Encode(byte[] data)
- Specified by:
 base32Encode in interface Formatters
 
 
base32Decode
public byte[] base32Decode(java.lang.String data)
- Specified by:
 base32Decode in interface Formatters
 
 
getAlphanumericComparator
public java.util.Comparator getAlphanumericComparator(boolean ignore_case)
- Specified by:
 getAlphanumericComparator in interface Formatters