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图像库中的图像的字节流。
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图像库中的图像的字节流。
相关文章推荐
- Use Flex and JavaScript to get the full path of a local File
- 安卓 方向传感器The field Sensor.TYPE_ORIENTATION is deprecated use SensorManager.getOrientation()instead介绍
- How Do use the ImageButton in DataGrid...
- How to get the RGB values for a pixel on an image on the iphone
- How to use C# code to get the windows components
- Openstack: python API “how to download image from glance using the python api”
- Use the Get-Command PowerShell Cmdlet to Find Parameter Set Information
- you try to use the STM32 Library examples with IAR 6.30.6 you get a loot of error
- [eZ publish] How to use GD as the image engineer
- Use Jquery to get json data from the server-side php page
- Get the data of today only use c language
- "Unable to get image data from canvas because the canvas has been tainted by cross-origin data"问题产生原因及解决办法
- How to Use JSONKit for iOS and the Rotten Tomatoes API
- 编码解码器无法使用提供的流类型 The codec cannot use the type of stream provided
- The GetSystemPowerStatus API
- Use C# to get JSON Data from the Web and Map it to .NET Class => Made Easy! 转
- Error: Target id 'android--1' is not valid. Use 'android.bat list targets' to get the target ids.
- Use jcvsii to get the cvs info
- [Python] Use a Python Generator to Crawl the Star Wars API
- Don’t Use the Win32 API PostThreadMessage() to Post Messages to UI Threads(翻译)