private String getFormattedFileSize(final long value) {
        final long[] dividers = new long[]{TERABYTES, GIGABYTES, MEGABYTES, KILOBYTES, 1};
        final String[] units = new String[]{"TB", "GB", "MB", "KB", "bytes"};
        if (value < 1) {
            return "";
        }
        String result = null;
        for (int i = 0; i < dividers.length; i++) {
            final long divider = dividers[i];
            if (value >= divider) {
                result = formatFileSizeString(value, divider, units[i]);
                break;
            }
        }
        return result;
    }
Formats the input value in terms of file size.

@param value The value to convert to a file size.
@return The formatted size of the input file.
core/src/main/java/com/filebrowser/FileBrowserEngine/FileBrowserEngine.java