private static final String pad(String str, char ch, int maxLength, boolean left) {
		if (str == null)
			return "";
		if (maxLength < 1)
			throw new IllegalArgumentException("指定位数不能小于1!");
		int length = str.length();
		if (maxLength > length) {
			int diffSize = maxLength - length;
			char[] chars = new char[maxLength]; // 直接采用高效的char数组形式构建字符串
			// Arrays.fill(chars, '0'); //内部也是循环赋值，直接循环赋值效率更高
			if (left) {
				for (int i = 0; i < diffSize; i++) {
					chars[i] = ch;
				}
				System.arraycopy(str.toCharArray(), 0, chars, diffSize, length); // 此方法由JVM底层实现，因此效率相对较高
			} else {
				for (int i = diffSize; i < maxLength; i++) {
					chars[i] = ch;
				}
				System.arraycopy(str.toCharArray(), 0, chars, 0, length);
			}
			str = new String(chars);
		}
		return str;
	}