Retrieve the de-serialized object
@param savePoint the save point
@param objClass the object class
@return the object the object
4652
public Object restore(String savePoint, Class<?> objClass)
   {
	String location = whereIs(savePoint, objClass);
	
	Object cacheObject = CacheFarm.getCache().get(location);
	if(cacheObject  != null)
	   return cacheObject;
	
	cacheObject = IO.deserialize(new File(location));
	CacheFarm.getCache().put(location, cacheObject);
	
	return cacheObject;
   }
189592
@NullSafe
  public static Class<?> getClass(Object obj) {
    return obj != null ? obj.getClass() : null;
  }
548437
private ClassDescriptor getRealClassDescriptor(ClassDescriptor aCld, Object anObj)
    {
        ClassDescriptor result;

        if(aCld.getClassOfObject() == ProxyHelper.getRealClass(anObj))
        {
            result = aCld;
        }
        else
        {
            result = aCld.getRepository().getDescriptorFor(anObj.getClass());
        }

        return result;
    }
1152718
public ObjectIdSerializer<?> getObjectId( Object object ) {
        if ( null != mapObjectId ) {
            return mapObjectId.get( object );
        }
        return null;
    }
376848
private String whereIs(String savePoint, Class<?> objClass)
   {
	if (savePoint == null || savePoint.length() == 0)
	   throw new RequiredException("savePoint");
	
	StringBuffer text = new StringBuffer();
	
	text.append(this.rootPath).append("/")
	.append(objClass.getName()).append(".")
	.append(savePoint).append(fileExtension);
	
	return text.toString();
   }
896697
public K getSavedId() {
        if (dbObjects.length == 0) {
            throw new MongoException("No objects to return");
        }
        if (dbObjects[0] instanceof JacksonDBObject) {
            throw new UnsupportedOperationException("Generated _id retrieval not supported when using stream serialization");
        }
        return jacksonDBCollection.convertFromDbId(dbObjects[0].get("_id"));
    }
544849
public Object createSavepoint() throws TransactionException {

		SavePoints savePoints = new SavePoints();

		for (TransactionStatus transactionStatus : transactionStatuses.values()) {
			savePoints.save(transactionStatus);
		}
		return savePoints;
	}
1045892
public static Savepoint loadCheckpointMetadata(DataInputStream in, ClassLoader classLoader) throws IOException {
		checkNotNull(in, "input stream");
		checkNotNull(classLoader, "classLoader");

		final int magicNumber = in.readInt();

		if (magicNumber == HEADER_MAGIC_NUMBER) {
			final int version = in.readInt();
			final SavepointSerializer<?> serializer = SavepointSerializers.getSerializer(version);

			if (serializer != null) {
				return serializer.deserialize(in, classLoader);
			}
			else {
				throw new IOException("Unrecognized checkpoint version number: " + version);
			}
		}
		else {
			throw new IOException("Unexpected magic number. This can have multiple reasons: " +
					"(1) You are trying to load a Flink 1.0 savepoint, which is not supported by this " +
					"version of Flink. (2) The file you were pointing to is not a savepoint at all. " +
					"(3) The savepoint file has been corrupted.");
		}
	}
321939
public void store(String savePoint, Object obj)
   {
	if (savePoint == null)
	   throw new RequiredException("savePoint");
	
	if (obj == null)
	   throw new RequiredException("obj");
	
	String location = whereIs(savePoint, obj.getClass());

	Debugger.println(this,"Storing in "+location);
	
	IO.serializeToFile(obj, new File(location));
   }
1366652
@Deprecated
  public static <A> A getClassAnnotation(Object object, Class<A> annotationClass) {
    return (A) getAnnotation(object, (Class<? extends Annotation>) annotationClass);
  }
1371461
public static void disposeSavepoint(
			String pointer,
			StateBackend stateBackend,
			ClassLoader classLoader) throws IOException, FlinkException {

		checkNotNull(pointer, "location");
		checkNotNull(stateBackend, "stateBackend");
		checkNotNull(classLoader, "classLoader");

		final CompletedCheckpointStorageLocation checkpointLocation = stateBackend.resolveCheckpoint(pointer);

		final StreamStateHandle metadataHandle = checkpointLocation.getMetadataHandle();

		// load the savepoint object (the metadata) to have all the state handles that we need
		// to dispose of all state
		final Savepoint savepoint;
		try (InputStream in = metadataHandle.openInputStream();
			DataInputStream dis = new DataInputStream(in)) {

			savepoint = loadCheckpointMetadata(dis, classLoader);
		}

		Exception exception = null;

		// first dispose the savepoint metadata, so that the savepoint is not
		// addressable any more even if the following disposal fails
		try {
			metadataHandle.discardState();
		}
		catch (Exception e) {
			exception = e;
		}

		// now dispose the savepoint data
		try {
			savepoint.dispose();
		}
		catch (Exception e) {
			exception = ExceptionUtils.firstOrSuppressed(e, exception);
		}

		// now dispose the location (directory, table, whatever)
		try {
			checkpointLocation.disposeStorageLocation();
		}
		catch (Exception e) {
			exception = ExceptionUtils.firstOrSuppressed(e, exception);
		}

		// forward exceptions caught in the process
		if (exception != null) {
			ExceptionUtils.rethrowIOException(exception);
		}
	}
364700
def getObject(self, url_or_requests_response, params=None):
        ''
        if isinstance(url_or_requests_response, requests.models.Response):
            # this is a raw xml response that we need to parse
            url = url_or_requests_response.url
            o = lxml.objectify.fromstring(url_or_requests_response.content)
        else:
            # this is an url that we need to fetch
            url = url_or_requests_response
            o = self.get(url, params=params) # (.get() will parse this for us)

        parent = os.path.dirname(url).replace('up.jottacloud.com', 'www.jottacloud.com')
        if o.tag == 'error':
            JFSError.raiseError(o, url)
        elif o.tag == 'device': return JFSDevice(o, jfs=self, parentpath=parent)
        elif o.tag == 'folder': return JFSFolder(o, jfs=self, parentpath=parent)
        elif o.tag == 'mountPoint': return JFSMountPoint(o, jfs=self, parentpath=parent)
        elif o.tag == 'restoredFiles': return JFSFile(o, jfs=self, parentpath=parent)
        elif o.tag == 'deleteFiles': return JFSFile(o, jfs=self, parentpath=parent)
        elif o.tag == 'file':
            return ProtoFile.factory(o, jfs=self, parentpath=parent)
#             try:
#                 if o.latestRevision.state == 'INCOMPLETE':
#                     return JFSIncompleteFile(o, jfs=self, parentpath=parent)
#                 elif o.latestRevision.state == 'CORRUPT':
#                     return JFSCorruptFile(o, jfs=self, parentpath=parent)
#             except AttributeError:
#                 return JFSFile(o, jfs=self, parentpath=parent)
        elif o.tag == 'enableSharing': return JFSenableSharing(o, jfs=self)
        elif o.tag == 'user':
            self.fs = o
            return self.fs
        elif o.tag == 'filedirlist': return JFSFileDirList(o, jfs=self, parentpath=parent)
        elif o.tag == 'searchresult': return JFSsearchresult(o, jfs=self)
        raise JFSError("invalid object: %s <- %s" % (repr(o), url_or_requests_response))
40757
public static Object get(Object obj, String property) throws Throwable {
        return getGetterMethod(obj.getClass(), property).invoke(obj);
    }
842768
protected Object jsonDeserialize(byte[] in, Class<?> cls) {
        if (in == null || in.length == 0) {
            return null;
        }
        Object res = null;
        try {
            res = JsonUtils.json2Object(new String(in, "utf-8"), cls);
        } catch (UnsupportedEncodingException e) {
            logger.error("DeSerialize object fail ", e);
        }
        return res;
    }
1165633
static public Object deserialize(InputStream in, Class<?> cls)
		throws IOException
	{
		if (cls==null)
			throw new NullPointerException("cls");
		
		Object obj = deserialize(in);
		if (!cls.isInstance(obj))
		{
			throw new InvalidObjectException("type of deserialized instance not of required class.");
		}
		
		return obj;
	}
1089632
private Object extractObjectToStore(Object obj)
    {
        Object result = obj;
        // only do something if obj != null
        if(result != null)
        {
            // ProxyObjects only have to be updated if their real
            // subjects have been loaded
            result = getProxyFactory().getRealObjectIfMaterialized(obj);
            // null for unmaterialized Proxy
            if (result == null)
            {
                if(logger.isDebugEnabled())
                    logger.debug("No materialized object could be found -> nothing to store," +
                            " object was " + ObjectUtils.identityToString(obj));
            }
        }
        return result;
    }
476202
private String getObjectInfoFromRealObject() throws IOException, ClassNotFoundException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getObjectInfoFromRealObject");
        final Serializable obj = objMsg.getRealObject();
        final String oscDesc = (obj == null) ? "null" : ObjectStreamClass.lookupAny(obj.getClass()).toString();
        final String result = String.format("%s: %s", HEADER_PAYLOAD_OBJ, oscDesc);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getObjectInfoFromRealObject", result);
        return result;
    }