@Override
	protected void read(InputBuffer b) throws IOException, ParsingException {
		VariableLengthIntegerMessage vLength = getMessageFactory().parseVariableLengthIntegerMessage(b);
		b = b.getSubBuffer(vLength.length());
		long length = vLength.getLong();

		if (length < 0 || length > Options.getInstance().getInt("protocol.maxInvLength")) {
			throw new ParsingException("Too much inventory vectors: " + length);
		}

		inv = new ArrayList<>((int) length);

		for (int i = 0; i < length; i++) {
			InventoryVectorMessage ivm = getMessageFactory().parseInventoryVectorMessage(b);
			inv.add(ivm);
			b = b.getSubBuffer(ivm.length());
		}
	}