/** * Convert a passed byte string (e.g. 50b, 100k, or 250m) to mebibytes for * internal use. * <p> * If no suffix is provided, the passed number is assumed to be in mebibytes. */ public static long byteStringAsMb(String str) { return byteStringAs(str, ByteUnit.MiB); }
/** * Convert a passed byte string (e.g. 50b, 100k, or 250m) to gibibytes for * internal use. * <p> * If no suffix is provided, the passed number is assumed to be in gibibytes. */ public static long byteStringAsGb(String str) { return byteStringAs(str, ByteUnit.GiB); }
/** * Convert a passed byte string (e.g. 50b, 100k, or 250m) to bytes for * internal use. * <p> * If no suffix is provided, the passed number is assumed to be in bytes. */ public static long byteStringAsBytes(String str) { return byteStringAs(str, ByteUnit.BYTE); }
/** * Convert a passed byte string (e.g. 50b, 100k, or 250m) to kibibytes for * internal use. * <p> * If no suffix is provided, the passed number is assumed to be in kibibytes. */ public static long byteStringAsKb(String str) { return byteStringAs(str, ByteUnit.KiB); }