private void expandCapacity(int minimumCapacity) {
		int newCapacity = (payload.length + 1) * 2;
		if (newCapacity < 0) {
			newCapacity = Integer.MAX_VALUE;
		} else if (minimumCapacity > newCapacity) {
			newCapacity = minimumCapacity;
		}
		byte[] newPayload = new byte[newCapacity];
		try {
			while (curLength > payload.length)
				curLength--;
			System.arraycopy(payload, 0, newPayload, 0, curLength);
		} catch (Exception e) {

		}
		payload = newPayload;
	}