itext changes

This commit is contained in:
Anthony Stirling
2023-09-02 00:05:50 +01:00
parent 648df7b3d3
commit a7cd6bfd2e
12 changed files with 668 additions and 497 deletions

View File

@@ -65,7 +65,8 @@ public class GeneralUtils {
} else if (sizeStr.endsWith("B")) {
return Long.parseLong(sizeStr.substring(0, sizeStr.length() - 1));
} else {
// Input string does not have a valid format, handle this case
// Assume MB if no unit is specified
return (long) (Double.parseDouble(sizeStr) * 1024 * 1024);
}
} catch (NumberFormatException e) {
// The numeric part of the input string cannot be parsed, handle this case