当前位置: 首页 > news >正文

备案的网站程序上传网站域名去哪买

备案的网站程序上传,网站域名去哪买,深圳创业贷款条件申请及流程,做网站编辑如何写好一篇新闻java缓存读取图片老师布置了任务#xff0c;需要把数据库中的图片一缓存的形式读出#xff0c;不要说什么数据库中路劲#xff0c;图片整体较大#xff0c;在给别人使用时不现实。关键代码#xff1a;for(int i0;i1;i){downloadDB(bi);pm[i]new paintimage(bi);}publi…java缓存读取图片老师布置了任务需要把数据库中的图片一缓存的形式读出不要说什么数据库中路劲图片整体较大在给别人使用时不现实。关键代码for(int i0;i1;i){downloadDB(bi);pm[i]new paintimage(bi);}public void downloadDB(BufferedImage bi){try{/* String sc:\\downloadDB\\i.png;File filenew File(s);FileOutputStream fosnew FileOutputStream(file);*/InputStream innull;String urljdbc:mysql://192.168.**.***:3306/de;Class.forName(com.mysql.jdbc.Driver);Connection conDriverManager.getConnection(url,root,***);String sqlselect * from campusimage;Statement stcon.createStatement();ResultSet rsst.executeQuery(sql);for(int j0;j1;j)rs.next();int m;if(rs.next())inrs.getBinaryStream(1);/*while((min.read())!-1)fos.write(m);*/BufferedInputStream isnew BufferedInputStream(in);biImageIO.read(is);System.out.println(00000000000);rs.close();st.close();con.close();}catch(Exception e){e.printStackTrace();}}class paintimage extends JPanel{//ImageIcon iconnull;Image imanull;paintimage(BufferedImage bi){/*String s1c:\\downloadDB\\i.png;iconnew ImageIcon(s1);imaicon.getImage();*/ima(Image)bi;setBounds(0,0,700,600);System.out.println(1111111111);}public void paint(Graphics g){g.drawImage(ima,0,0,700,600,null);System.out.println(2222222222);}}求指教我会出的是空白图。java缓存图片数据库mysql分享到------解决方案--------------------如果读出来是16进制字符串的话16进制字符串-》byte数组-》流-》文件public class ImgHelper {public static void getImg(String hexString) {byte[] b  ByteHelper.hexStringToBytes(hexString);InputStream is  ByteHelper.byte2Input(b);createFile(is, new File(D://pp.jpg));}//生成图像文件public static void createFile(InputStream is, File targetFile) {BufferedInputStream inBuff  null;BufferedOutputStream outBuff  null;try {// 新建文件输入流并对它进行缓冲inBuff  new BufferedInputStream(is);// 新建文件输出流并对它进行缓冲try {outBuff  new BufferedOutputStream(new FileOutputStream(targetFile));// 缓冲数组byte[] b  new byte[1024 * 5];int len;while ((len  inBuff.read(b)) ! -1) {outBuff.write(b, 0, len);}// 刷新此缓冲的输出流outBuff.flush();} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}} finally {// 关闭流try {if (inBuff ! null)inBuff.close();if (outBuff ! null)outBuff.close();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}}}public class ByteHelper {public static byte[] hexStringToBytes(String hexString) {if (hexString  null------解决方案--------------------hexString.equals()) {return null;}hexString  hexString.toUpperCase();int length  hexString.length() / 2;char[] hexChars  hexString.toCharArray();byte[] d  new byte[length];for (int i  0; i int pos  i * 2;
http://wiki.neutronadmin.com/news/331987/

相关文章:

  • 做网站资源物业公司企业文化建设
  • 做品牌网站哪个好用网站登录账号密码保存
  • 图书馆网站建设请示龙岩建设局网站声明
  • 百度集团网站建设方案手机网站 php
  • 网站二级域名怎么弄建设网站的各种问题
  • 阿里巴巴网站建设规划查询网站后台地址
  • 南京商城网站开发设计网站上的招牌图怎么做
  • 永州网站开发公司wordpress 菜单相册
  • 中国有名的网站建设公司徐州企业自助建站
  • 南通外贸网站制作中国工程监理人才网
  • 知道域名怎么进入网站网页设计代码中字体的颜色如何改
  • c#网站开发框架有seo优化顾问
  • 淘宝网发布网站建设重庆网站搭建公司
  • 成品网站建设网盘怎么做电影网站
  • 双桥网站建设关于市场营销的案例
  • 郑州本地做团购的网站润滑油东莞网站建设技术支持
  • 如果做网站接口在线做试卷网站
  • flash网站代码下载学校培训网站建设
  • 网站开发包含网站维护吗第三方wordpress安卓客户端
  • 365网站建设徐州网站建设的特点
  • 深圳建站公司告诉你十个建站步骤厦门做个网站多少钱
  • 免费的网站软件山东网站排行
  • 做简历网站js模板网站
  • 源码屋整站源码内推网
  • 浙江华临建设集团有限公司网站婚纱网站建设目的
  • 南昌it制作电商网站的公司广州公司网站建设
  • 建设网站的文案范文棋牌类网站设计建设
  • 哪个网站可以做担保交易wordpress媒体库 扩容
  • tp5网站开发模板wordpress网站顶部加横幅
  • 如何做网站软件12380网站建设情况汇报