public class ByteSizeFormatter extends Object implements org.apache.wicket.util.io.IClusterable
Constructor and Description |
---|
ByteSizeFormatter() |
ByteSizeFormatter(int decimalPlaces) |
ByteSizeFormatter(String gigabyteSuffix,
String megabyteSuffix,
String kilobyteSuffix,
String byteSuffix,
int decimalPlaces) |
Modifier and Type | Method and Description |
---|---|
String |
format(long filesize)
Formats filesize in bytes as appropriate to bytes, KB, MB or GB.
|
String |
format(long filesize,
Locale loc)
Formats filesize in bytes as appropriate to bytes, KB, MB or GB, based on the given
locale . |
public ByteSizeFormatter()
public ByteSizeFormatter(int decimalPlaces)
public String format(long filesize)
filesize
- in bytesCopyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.