캐시된 URL 아티팩트 보기

다음을 참조하십시오.

Rational Asset Manager는 URL 아티팩트의 캐시 사본을 유지할 수 있습니다. RAMURLArtifact.hasCachedContent() 메소드를 사용하여 아티팩트의 다운로드 가능한 캐시 버전이 있는지 확인하십시오. RAMURLArtifact.getCachedContent()를 사용하여 아티팩트 컨텐츠의 캐시 버전에 대한 InputStream을 가져오십시오.

                //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
	  															message.toString()));										
	  				  			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
	  			}
	  		}
	  	}

피드백