Autopsy  4.16.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil Class Reference

Static Public Member Functions

static String getSizeString (Long size)
 
static String getSizeString (Long size, DecimalFormat format, boolean showFullSize)
 

Private Member Functions

 SizeRepresentationUtil ()
 

Static Private Attributes

static final DecimalFormat APPROXIMATE_SIZE_FORMAT = new DecimalFormat("#.##")
 
static final int SIZE_CONVERSION_CONSTANT = 1000
 
static List< String > UNITS
 

Detailed Description

This class provides utilities for representing storage size in most relevant units (i.e. bytes, megabytes, etc.).

Definition at line 30 of file SizeRepresentationUtil.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.SizeRepresentationUtil ( )
private

Definition at line 101 of file SizeRepresentationUtil.java.

Member Function Documentation

static String org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.getSizeString ( Long  size)
static

Get a long size in bytes as a string formated to be read by users.

Parameters
sizeLong value representing a size in bytes.
Returns
Return a string formated with a user friendly version of the size as a string, returns empty String when provided empty size.

Definition at line 52 of file SizeRepresentationUtil.java.

static String org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.getSizeString ( Long  size,
DecimalFormat  format,
boolean  showFullSize 
)
static

Get a long size in bytes as a string formated to be read by users.

Parameters
sizeLong value representing a size in byte.s
formatThe means of formatting the number.
showFullSizeOptionally show the number of bytes in the datasource.
Returns
Return a string formated with a user friendly version of the size as a string, returns empty String when provided empty size.

Definition at line 75 of file SizeRepresentationUtil.java.

References org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.SIZE_CONVERSION_CONSTANT.

Member Data Documentation

final DecimalFormat org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.APPROXIMATE_SIZE_FORMAT = new DecimalFormat("#.##")
staticprivate

Definition at line 33 of file SizeRepresentationUtil.java.

final int org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.SIZE_CONVERSION_CONSTANT = 1000
staticprivate
List<String> org.sleuthkit.autopsy.datasourcesummary.ui.SizeRepresentationUtil.UNITS
staticprivate
Initial value:
= Arrays.asList(
Bundle.SizeRepresentationUtil_units_bytes(),
Bundle.SizeRepresentationUtil_units_kilobytes(),
Bundle.SizeRepresentationUtil_units_megabytes(),
Bundle.SizeRepresentationUtil_units_gigabytes(),
Bundle.SizeRepresentationUtil_units_terabytes(),
Bundle.SizeRepresentationUtil_units_petabytes()
)

Definition at line 35 of file SizeRepresentationUtil.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2020 Basis Technology. Generated on: Tue Sep 22 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.