private static int extractValue(StringBuilder buffer) {
		int value = 0;
		while (buffer.length() > 0) {
			char ch = buffer.charAt(0);
			if (ch >= '0' && ch <= '9') {
				value *= 10;
				value += ch - '0';
			} else if (ch != ' ') {
				break;
			}
			buffer.deleteCharAt(0);
		}
		return value;
	}