@Override
	protected void ensureCapacity(int incCap) {
		if(incCap < remained()) { return; }
		
		int capacity = capacity();
		int newCapacity = 0;
		if(2*incCap <= capacity) {
			newCapacity = capacity * 3 / 2 + 1;
		}else {
			newCapacity = capacity * 2;
		}
		char[] newBuf = new char[newCapacity];

		if(size > 0) {
			if(putIndex > takeIndex) {
				System.arraycopy(buffer, takeIndex, newBuf, 0, size);
			}else {
				int len = buffer.length - takeIndex;
				System.arraycopy(buffer, takeIndex, newBuf, 0, len);
				if(size > len) { System.arraycopy(buffer, 0, newBuf, len, putIndex); }
			}
		}
		buffer = newBuf;
		takeIndex = 0;
		putIndex = size;
	}