public void read (Kryo kryo, Input input, Collection collection) {
		int length;
		if (this.length != null)
			length = this.length;
		else
			length = input.readInt(true);
		if (length == 0) return;
		if (collection instanceof ArrayList) ((ArrayList)collection).ensureCapacity(length);
		if (serializer != null) {
			if (elementsCanBeNull) {
				for (int i = 0; i < length; i++)
					collection.add(kryo.readObjectOrNull(input, elementClass, serializer));
			} else {
				for (int i = 0; i < length; i++)
					collection.add(kryo.readObject(input, elementClass, serializer));
			}
		} else {
			for (int i = 0; i < length; i++)
				collection.add(kryo.readClassAndObject(input));
		}
	}