Class Format


  • public final class Format
    extends Object
    • Method Detail

      • timestamp

        public static String timestamp​(Date date)
      • shortDateTime

        public static String shortDateTime​(Date date)
      • mediumDateTime

        public static String mediumDateTime​(Date date)
      • humanReadableFileSize

        public static String humanReadableFileSize​(long size)
      • humanReadableDuration

        public static String humanReadableDuration​(long duration)
        Formats the elapsed time (in milliseconds) to a human readable format: example 1 minute, 16 seconds.
        Parameters:
        duration - in milliseconds
        Returns:
        The string representation of the human readable format.
      • humanReadableDurationNanoseconds

        public static String humanReadableDurationNanoseconds​(long duration)
        Formats the elapsed time (in nanoseconds) to a human readable format: example 1 minute, 16 seconds.
        Parameters:
        duration - in nanoseconds
        Returns:
        The string representation of the human readable format.