您的位置:首页 > Web前端

Get the image stream use liferay API

2012-12-06 11:06 344 查看
转载自:http://www.chenwg.com/android开发

In a project ,I want to get the image stream from liferay , I find some method from liferay API document can slove this problem , and the code is :

public byte[] getImage(long imageId) {
byte[] imageBytes=null;
try {
Image image=ImageLocalServiceUtil.getImage(imageId);
imageBytes=image.getTextObj();

} catch (Exception e) {
e.printStackTrace();
}
return imageBytes;
}
获取liferay图像库中的图像的字节流。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: