public static MemorySize parse(String text, MemoryUnit defaultUnit) throws IllegalArgumentException {
		if (!hasUnit(text)) {
			return parse(text + defaultUnit.getUnits()[0]);
		}

		return parse(text);
	}
public static MemorySize parse ( String text , MemoryUnit defaultUnit ) throws IllegalArgumentException { if ( ! hasUnit ( text ) ) { return parse ( text + defaultUnit . getUnits ( ) [ 0 ] ) ; } return parse ( text ) ; }
Parses the given string with a default unit.

@param text The string to parse.
@param defaultUnit specify the default unit.
@return The parsed MemorySize.

@throws IllegalArgumentException Thrown, if the expression cannot be parsed.