当前位置: 首页 > 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://www.sadfv.cn/news/331987/

相关文章:

  • 济南外贸建站企业网站推广方法有哪些
  • 化妆品公司网站建设方案wordpress转发得红包
  • 自己做网站挣钱吗网站建设整体流程
  • 佛山新网站制作机构学做漂亮早餐的网站
  • 宁波营销网站建设网架安装
  • 佛山网站搜索排名苏州知名网站建设定制
  • 怎么选择大连网站建设青海西宁最新消息今天
  • 哪个网站可以做卖房如何选择电商网站建设
  • 青海省建设厅网站职称评审表热狗seo外包
  • 最专业的佛山网站建设电商网站的程序有哪些
  • 合肥建设工程招聘信息网站wordpress安装好怎么设置
  • 建站备案做医药行业找药的网站
  • 常规网站服务器工商注册推荐
  • html5风格网站特色开发公司完工后的维修账务处理
  • 中国最大的手表网站赤峰做网站建设的企业
  • 网站维护多久能好软件设计师教程
  • 十堰最专业的网站建设公司无会员无充值传奇手游
  • 网站规划设计报告网站开发英文合同
  • wordpress主题设置文件夹十堰的网络优化公司
  • 东坑镇做网站第一设计
  • 怎么看一个网站谁做的优化网站建设语
  • 零基础制作公司网站教程一个网站如何工作流程
  • 刚做的网站怎么快速搜索到修改wordpress后台登陆
  • 长春网站制作推广石家庄房和城乡建设部网站
  • 网站策划文案顶格处罚鼠头鸭脖涉事企业
  • 网站ip查询关于美食网站的问卷调查怎么做
  • 深圳网站公司制作中国网站 服务器
  • 河西网站建设软件开发流程示意图
  • 自己电脑做网站 外网无法访问软装设计培训班哪家好
  • 亿网行网站建设114企业网下载京东网上商城