public class StorageUnitConverter extends Object
Constructor and Description |
---|
StorageUnitConverter() |
Modifier and Type | Method and Description |
---|---|
String |
byteCountToDisplaySize(long byteCount)
Converts byte count to the human readable representation.
|
long |
displaySizeToByteCount(String displaySize)
Convert human human readable file size format to byte equivalent.
|
public String byteCountToDisplaySize(long byteCount)
For example: 13.1MB in byte count will return 13MB and 13.9MB in byte count wil return 13MB.
Supported types: EB, PB, TB, GB, MB, KB or B (for bytes).
byteCount
- public long displaySizeToByteCount(String displaySize)
Accepted units:
displaySize
- human readable size formatCopyright © 2020 Hitachi Vantara. All rights reserved.