Class FormattersImpl

  • All Implemented Interfaces:
    Formatters

    public class FormattersImpl
    extends java.lang.Object
    implements Formatters
    • Constructor Detail

      • FormattersImpl

        public FormattersImpl()
    • Method Detail

      • 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
      • 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
      • 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<java.lang.String> getAlphanumericComparator​(boolean ignore_case)
        Specified by:
        getAlphanumericComparator in interface Formatters
      • getAlphanumericComparator2

        public static java.util.Comparator<java.lang.String> getAlphanumericComparator2​(boolean ignore_case)