キャッシュ内の URL 成果物の表示

以下を参照してください。

Rational Asset Manager は、URL 成果物のキャッシュ・コピーを保持することができます。 成果物にダウンロード可能なキャッシュ・バージョンがあるかどうかを確認するには、メソッド RAMURLArtifact.hasCachedContent() を使用します。 成果物のコンテンツのキャッシュ・バージョンに対する InputStream を取得するには、RAMURLArtifact.getCachedContent() を使用します。

                //Get the artifact root
		FolderArtifact root = asset.getArtifactsRoot();
	  	Artifact[] children = root.getChildren();
	  	
	  	//Iterate through the artifacts in the root folder
	  	for(int i = 0; i < children.length; i++){
	  		//Check every URL artifact
	  		if(Artifact.TYPE_URL.equals(children[i].getType())){
	  			RAMURLArtifact urlArtifact = ((RAMURLArtifact)children[i]);
	  			
	  			//Check if there is cached content for this URL
	  			if(urlArtifact.hasCachedContent()){
	   				//Get an input stream to the cached content of this URL
	  				InputStream is = urlArtifact.getCachedContent();
	  				
	  				//Read the URL's cached content
	  			}
	  		}
	  	}

フィードバック