[Building Sakai] How to get the content of ResourceType.TYPE_URL

swwangl at tsmc.com swwangl at tsmc.com
Wed Aug 24 18:26:32 PDT 2011


Anyone could tell me how to get the content of a resource which type =
ResourceType.TYPE_URL

ex:
I define a URL which resource type =
org.sakaiproject.content.types.urlResource and the content="/a.html"
I just want to get the content.

Anyone could tell me how to get it?

if (lItem.getResourceType().equals(ResourceType.TYPE_URL)){
	String rid=lItem.getId();
	ContentResource a= contentService.getResource(rid);
	byte[] c=a.getContent();   ==> ?? It always return the overload
exception
}


Any suggestion is very appreciated..

Best Regards,
Joan


 --------------------------------------------------------------------------- 
                                                         TSMC PROPERTY       
 This email communication (and any attachments) is proprietary information   
 for the sole use of its                                                     
 intended recipient. Any unauthorized review, use or distribution by anyone  
 other than the intended                                                     
 recipient is strictly prohibited.  If you are not the intended recipient,   
 please notify the sender by                                                 
 replying to this email, and then delete this email and any copies of it     
 immediately. Thank you.                                                     
 --------------------------------------------------------------------------- 






More information about the sakai-dev mailing list