org.gudy.azureus2.plugins.utils
Interface Formatters

All Known Implementing Classes:
FormattersImpl

public interface Formatters

Author:
parg

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

Field Detail

BYTE_ENCODING

static final java.lang.String BYTE_ENCODING
See Also:
Constant Field Values

TEXT_ENCODING

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

formatByteCountToKiBEtc

java.lang.String formatByteCountToKiBEtc(long bytes)

formatByteCountToKiBEtcPerSec

java.lang.String formatByteCountToKiBEtcPerSec(long bytes)

formatPercentFromThousands

java.lang.String formatPercentFromThousands(long thousands)

formatByteArray

java.lang.String formatByteArray(byte[] data,
                                 boolean no_spaces)

encodeBytesToString

java.lang.String encodeBytesToString(byte[] bytes)

decodeBytesFromString

byte[] decodeBytesFromString(java.lang.String str)

formatDate

java.lang.String formatDate(long millis)

formatTimeOnly

java.lang.String formatTimeOnly(long millis)
Since:
3.0.5.3

formatTimeOnly

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

formatDateOnly

java.lang.String formatDateOnly(long millis)
Since:
3.0.5.3

formatTimeFromSeconds

java.lang.String formatTimeFromSeconds(long seconds)

formatETAFromSeconds

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

Parameters:
seconds -
Returns:
Since:
2.4.0.3

bEncode

byte[] bEncode(java.util.Map map)
               throws java.io.IOException
Throws:
java.io.IOException

bDecode

java.util.Map bDecode(byte[] data)
                      throws java.io.IOException
Throws:
java.io.IOException

base32Encode

java.lang.String base32Encode(byte[] data)

base32Decode

byte[] base32Decode(java.lang.String data)

getAlphanumericComparator

java.util.Comparator getAlphanumericComparator(boolean ignore_case)