protected String trimString(final String str, final int length) {
		if (str == null) {
			return null;
		}

		if (str.length() <= length) {
			return str;
		} else {
			return str.substring(0, length);
		}
	}