protected int fillInputBuf() throws IOException {
		if (inputLen < 128) {
			// copy old data to the start position
			if (inputLen != 0) {
				System.arraycopy(buf, inputPos, buf, 0, inputLen);
			}
			inputPos = 0;
		}

		// read in new data
		inputRes = in.read(buf, inputPos + inputLen, buf.length - inputPos
				- inputLen);
		if (inputRes <= 0 && inputLen == 0) {
			return -1;
		} else if (inputRes > 0) {
			inputLen += inputRes;
		}
		return inputLen;
	}