OutputStream out=null;
BufferedOutputStream bos=null;
byte [] photos=null;
List<Images> imagesList = imagesService.imagesList(start, end);
for (Images images : imagesList) {
photos= ( images.getImagephoto()==null?null:images.getImagephoto() );
}out=response.getOutputStream();
bos=new BufferedOutputStream(out);
bos.write(photos,0,photos.length);问题:
求解。
列表是进制,没显示图片。库中是Blob型,映射是byte[]
BufferedOutputStream 怎么把byte输出图片
BufferedOutputStream bos=null;
byte [] photos=null;
List<Images> imagesList = imagesService.imagesList(start, end);
for (Images images : imagesList) {
photos= ( images.getImagephoto()==null?null:images.getImagephoto() );
}out=response.getOutputStream();
bos=new BufferedOutputStream(out);
bos.write(photos,0,photos.length);问题:
求解。
列表是进制,没显示图片。库中是Blob型,映射是byte[]
BufferedOutputStream 怎么把byte输出图片
输出成XXX.jag文件就行了。至于怎么打开,怎么显示那就是图片浏览器的事儿了。
图片是进制入库的
把图片的内容读出来,然后写出成某种图片格式(图片格式:李固jpg,应该在Images类中有的)就行了。