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 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 String formatByteCountToKiBEtc(long bytes)
- Specified by:
formatByteCountToKiBEtc
in interface Formatters
formatByteCountToKiBEtcPerSec
public String formatByteCountToKiBEtcPerSec(long bytes)
- Specified by:
formatByteCountToKiBEtcPerSec
in interface Formatters
formatPercentFromThousands
public String formatPercentFromThousands(long thousands)
- Specified by:
formatPercentFromThousands
in interface Formatters
formatByteArray
public String formatByteArray(byte[] data,
boolean no_spaces)
- Specified by:
formatByteArray
in interface Formatters
encodeBytesToString
public String encodeBytesToString(byte[] bytes)
- Specified by:
encodeBytesToString
in interface Formatters
decodeBytesFromString
public byte[] decodeBytesFromString(String str)
- Specified by:
decodeBytesFromString
in interface Formatters
formatDate
public String formatDate(long millis)
- Specified by:
formatDate
in interface Formatters
formatTimeOnly
public String formatTimeOnly(long millis)
- Specified by:
formatTimeOnly
in interface Formatters
formatTimeOnly
public String formatTimeOnly(long millis,
boolean with_secs)
- Specified by:
formatTimeOnly
in interface Formatters
formatDateOnly
public String formatDateOnly(long millis)
- Specified by:
formatDateOnly
in interface Formatters
formatTimeFromSeconds
public String formatTimeFromSeconds(long seconds)
- Specified by:
formatTimeFromSeconds
in interface Formatters
formatETAFromSeconds
public 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(Map map)
throws IOException
- Specified by:
bEncode
in interface Formatters
- Throws:
IOException
bDecode
public Map bDecode(byte[] data)
throws IOException
- Specified by:
bDecode
in interface Formatters
- Throws:
IOException
base32Encode
public String base32Encode(byte[] data)
- Specified by:
base32Encode
in interface Formatters
base32Decode
public byte[] base32Decode(String data)
- Specified by:
base32Decode
in interface Formatters
getAlphanumericComparator
public Comparator getAlphanumericComparator(boolean ignore_case)
- Specified by:
getAlphanumericComparator
in interface Formatters