public void ensureCapacity(int capacity) {
		if(data == null) {
			data = new byte[capacity];
		}
		else if (data.length < capacity) {
			byte[] nb = new byte[capacity];
			System.arraycopy(data, 0, nb, 0, data.length);
			data = nb;
		}
	}