org.gudy.azureus2.plugins.utils
Interface Formatters

All Known Implementing Classes:
FormattersImpl

public interface Formatters

Author:
parg

Field Summary
static String BYTE_ENCODING
           
static String TEXT_ENCODING
           
 
Method Summary
 byte[] base32Decode(String data)
           
 String base32Encode(byte[] data)
           
 Map bDecode(byte[] data)
           
 byte[] bEncode(Map map)
           
 byte[] decodeBytesFromString(String str)
           
 String encodeBytesToString(byte[] bytes)
           
 String formatByteArray(byte[] data, boolean no_spaces)
           
 String formatByteCountToKiBEtc(long bytes)
           
 String formatByteCountToKiBEtcPerSec(long bytes)
           
 String formatDate(long millis)
           
 String formatDateOnly(long millis)
           
 String formatETAFromSeconds(long seconds)
          Format seconds remaining into an ETA value.
 String formatPercentFromThousands(long thousands)
           
 String formatTimeFromSeconds(long seconds)
           
 String formatTimeOnly(long millis)
           
 String formatTimeOnly(long millis, boolean include_secs)
           
 Comparator getAlphanumericComparator(boolean ignore_case)
           
 

Field Detail

BYTE_ENCODING

static final String BYTE_ENCODING
See Also:
Constant Field Values

TEXT_ENCODING

static final String TEXT_ENCODING
See Also:
Constant Field Values
Method Detail

formatByteCountToKiBEtc

String formatByteCountToKiBEtc(long bytes)

formatByteCountToKiBEtcPerSec

String formatByteCountToKiBEtcPerSec(long bytes)

formatPercentFromThousands

String formatPercentFromThousands(long thousands)

formatByteArray

String formatByteArray(byte[] data,
                       boolean no_spaces)

encodeBytesToString

String encodeBytesToString(byte[] bytes)

decodeBytesFromString

byte[] decodeBytesFromString(String str)

formatDate

String formatDate(long millis)

formatTimeOnly

String formatTimeOnly(long millis)
Since:
3.0.5.3

formatTimeOnly

String formatTimeOnly(long millis,
                      boolean include_secs)
Since:
3.0.5.3

formatDateOnly

String formatDateOnly(long millis)
Since:
3.0.5.3

formatTimeFromSeconds

String formatTimeFromSeconds(long seconds)

formatETAFromSeconds

String formatETAFromSeconds(long seconds)
Format seconds remaining into an ETA value.

Parameters:
seconds -
Returns:
Since:
2.4.0.3

bEncode

byte[] bEncode(Map map)
               throws IOException
Throws:
IOException

bDecode

Map bDecode(byte[] data)
            throws IOException
Throws:
IOException

base32Encode

String base32Encode(byte[] data)

base32Decode

byte[] base32Decode(String data)

getAlphanumericComparator

Comparator getAlphanumericComparator(boolean ignore_case)