Class FormatUtil


  • public class FormatUtil
    extends java.lang.Object
    .Provide to format message.
    • Constructor Summary

      Constructors 
      Constructor Description
      FormatUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String bytes2Hex​(byte[] data)  
      static void formatEntry​(long pos, io.netty.buffer.ByteBuf recBuff, boolean printMsg, LedgerIdFormatter ledgerIdFormatter, EntryFormatter entryFormatter)
      Format the message into a readable format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormatUtil

        public FormatUtil()
    • Method Detail

      • formatEntry

        public static void formatEntry​(long pos,
                                       io.netty.buffer.ByteBuf recBuff,
                                       boolean printMsg,
                                       LedgerIdFormatter ledgerIdFormatter,
                                       EntryFormatter entryFormatter)
        Format the message into a readable format.
        Parameters:
        pos - File offset of the message stored in entry log file
        recBuff - Entry Data
        printMsg - Whether printing the message body
        ledgerIdFormatter -
        entryFormatter -
      • bytes2Hex

        public static java.lang.String bytes2Hex​(byte[] data)