Class FileSizeFormat

java.lang.Object
org.apache.maven.cling.transfer.FileSizeFormat

public class FileSizeFormat extends Object
Formats file size with the associated SI prefix (GB, MB, kB) and using the patterns #0.0 for numbers between 1 and 10 and ###0 for numbers between 10 and 1000+ by default.
See Also:
  • Constructor Details

    • FileSizeFormat

      public FileSizeFormat()
  • Method Details

    • format

      public String format(long size)
    • format

      public String format(long size, FileSizeFormat.ScaleUnit unit)
    • format

      public String format(long size, FileSizeFormat.ScaleUnit unit, boolean omitSymbol)
    • format

      public void format(StringBuilder builder, long size)
    • format

      public void format(StringBuilder builder, long size, FileSizeFormat.ScaleUnit unit)
    • format

      public void format(org.apache.maven.api.services.MessageBuilder builder, long size)
    • format

      public void format(org.apache.maven.api.services.MessageBuilder builder, long size, FileSizeFormat.ScaleUnit unit)
    • formatRate

      public void formatRate(org.apache.maven.api.services.MessageBuilder builder, double rate)
    • formatProgress

      public String formatProgress(long progressedSize, long size)
    • formatProgress

      public void formatProgress(StringBuilder builder, long progressedSize, long size)