code: public Object readClassAndObject (Input input) {
  		if (input == null) throw new IllegalArgumentException("input cannot be null.");
  		beginObject();
  		try {
  			Registration registration = readClass(input);
  			if (registration == null) return null;
  			Class type = registration.getType();
  
  			Object object;
  			if (references) {
  				int stackSize = readReferenceOrNull(input, type, false);
  				if (stackSize == REF) return readObject;
  				object = registration.getSerializer().read(this, input, type);
  				if (stackSize == readReferenceIds.size) reference(object);
  			} else
  				object = registration.getSerializer().read(this, input, type);
  			if (TRACE || (DEBUG && depth == 1)) log("Read", object, input.position());
  			return object;
  		} finally {
  			if (--depth == 0 && autoReset) reset();
  		}
  	}
docs: Reads the class and object or null using the registered serializer.
  @return May be null.