Package org.apache.maven.cli.transfer
Class AbstractMavenTransferListener.FileSizeFormat
- java.lang.Object
-
- org.apache.maven.cli.transfer.AbstractMavenTransferListener.FileSizeFormat
-
- Enclosing class:
- AbstractMavenTransferListener
static class AbstractMavenTransferListener.FileSizeFormat extends java.lang.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
AbstractMavenTransferListener.FileSizeFormat.ScaleUnit
-
Field Summary
Fields Modifier and Type Field Description private java.text.DecimalFormat
largeFormat
private java.text.DecimalFormat
smallFormat
-
Constructor Summary
Constructors Constructor Description FileSizeFormat(java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
format(long size)
java.lang.String
format(long size, AbstractMavenTransferListener.FileSizeFormat.ScaleUnit unit)
java.lang.String
format(long size, AbstractMavenTransferListener.FileSizeFormat.ScaleUnit unit, boolean omitSymbol)
java.lang.String
formatProgress(long progressedSize, long size)
-
-
-
Method Detail
-
format
public java.lang.String format(long size)
-
format
public java.lang.String format(long size, AbstractMavenTransferListener.FileSizeFormat.ScaleUnit unit)
-
format
public java.lang.String format(long size, AbstractMavenTransferListener.FileSizeFormat.ScaleUnit unit, boolean omitSymbol)
-
formatProgress
public java.lang.String formatProgress(long progressedSize, long size)
-
-