Visualizar Artefatos da URL em Cache

O Rational Asset Manager pode manter uma cópia em cache de um artefato de URL. Utilize o método RAMURLArtifact.hasCachedContent() para verificar se um artefato tem uma versão em cache que pode ser transferida por download. Utilize RAMURLArtifact.getCachedContent() para obter um InputStream para a versão em cache do conteúdo do artefato.

                //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
	  			}
	  		}
	  	}

Feedback