public int read() throws IOException {
		// 从pre中取出一个字符
		int pre;
		if (capacity > 0) {
			pre = buffer[0];
			for (int i = 0; i < capacity - 1; i++) {
				buffer[i] = buffer[i + 1];
			}
			capacity--;
		} else {
			if (!inputEnd) {
				pre = input.read();
				if (pre < 0)
					inputEnd = true;
			} else
				pre = -1;
		}
		// 填充缓冲区
		if (!inputEnd) {
			int read;
			while (capacity < buffer.length) {
				read = input.read();
				if (read > 0) {
					buffer[capacity++] = read;
				} else {
					inputEnd = true;
					break;
				}
			}
		}
		return pre;
	}