Class UnitUtils

java.lang.Object
org.apache.camel.util.UnitUtils

public final class UnitUtils extends Object
Unit utils.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    printUnitFromBytes(long bytes)
    If having a size in bytes and wanting to print this in human friendly\ format with xx kB, xx MB, xx GB instead of a large byte number.
    static String
    printUnitFromBytes(long bytes, char decimal)
    If having a size in bytes and wanting to print this in human friendly\ format with xx kB, xx MB, xx GB instead of a large byte number.
    static String
    If having a size in bytes and wanting to print this in human friendly\ format with xx kB, xx MB, xx GB instead of a large byte number, using dot as decimal separator.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • printUnitFromBytes

      public static String printUnitFromBytes(long bytes)
      If having a size in bytes and wanting to print this in human friendly\ format with xx kB, xx MB, xx GB instead of a large byte number.
      Parameters:
      bytes - the value in bytes
    • printUnitFromBytesDot

      public static String printUnitFromBytesDot(long bytes)
      If having a size in bytes and wanting to print this in human friendly\ format with xx kB, xx MB, xx GB instead of a large byte number, using dot as decimal separator.
      Parameters:
      bytes - the value in bytes
    • printUnitFromBytes

      public static String printUnitFromBytes(long bytes, char decimal)
      If having a size in bytes and wanting to print this in human friendly\ format with xx kB, xx MB, xx GB instead of a large byte number.
      Parameters:
      bytes - the value in bytes
      decimal - the decimal separator char to use