GeneralUtils

This commit is contained in:
Anthony Stirling 2023-05-31 20:37:13 +01:00
parent 1b45ab7222
commit 1499e78795
2 changed files with 3 additions and 3 deletions

View file

@ -31,7 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import stirling.software.SPDF.utils.GeneralFileUtils; import stirling.software.SPDF.utils.GeneralUtils;
import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor;
import stirling.software.SPDF.utils.WebResponseUtils; import stirling.software.SPDF.utils.WebResponseUtils;
@ -56,7 +56,7 @@ public class CompressController {
Long expectedOutputSize = 0L; Long expectedOutputSize = 0L;
boolean autoMode = false; boolean autoMode = false;
if (expectedOutputSizeString != null && expectedOutputSizeString.length() > 1 ) { if (expectedOutputSizeString != null && expectedOutputSizeString.length() > 1 ) {
expectedOutputSize = GeneralFileUtils.convertSizeToBytes(expectedOutputSizeString); expectedOutputSize = GeneralUtils.convertSizeToBytes(expectedOutputSizeString);
autoMode = true; autoMode = true;
} }

View file

@ -1,6 +1,6 @@
package stirling.software.SPDF.utils; package stirling.software.SPDF.utils;
public class GeneralFileUtils { public class GeneralUtils {
public static Long convertSizeToBytes(String sizeStr) { public static Long convertSizeToBytes(String sizeStr) {
if (sizeStr == null) { if (sizeStr == null) {