@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ResizingByteBuffer other = (ResizingByteBuffer) obj;
		for(int ix = 0 ; ix<this.index ; ix++ ) {
			if(buf[ix] != other.buf[ix]) 
				return false;
		}
		return true;
	}