锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧洲专线一区,久久综合亚洲色HEZYO国产,亚洲欧洲日韩不卡http://www.tkk7.com/liuyxit/category/48876.html鍏變韓閰搞佺敎銆佽嫤銆佽荊zh-cnWed, 24 Aug 2011 09:08:32 GMTWed, 24 Aug 2011 09:08:32 GMT60Eclipse甯哥敤鎻掍歡瀹夎鍦板潃http://www.tkk7.com/liuyxit/archive/2011/08/16/356621.html涓夊垁嫻併伄閫嗛涓夊垁嫻併伄閫嗛Tue, 16 Aug 2011 04:16:00 GMThttp://www.tkk7.com/liuyxit/archive/2011/08/16/356621.htmlhttp://www.tkk7.com/liuyxit/comments/356621.htmlhttp://www.tkk7.com/liuyxit/archive/2011/08/16/356621.html#Feedback0http://www.tkk7.com/liuyxit/comments/commentRss/356621.htmlhttp://www.tkk7.com/liuyxit/services/trackbacks/356621.html

涓夊垁嫻併伄閫嗛 2011-08-16 12:16 鍙戣〃璇勮
]]>
mysql,sqlserver,oracle涓夌鏁版嵁搴撶殑澶у璞″瓨鍙?/title><link>http://www.tkk7.com/liuyxit/archive/2011/06/19/352605.html</link><dc:creator>涓夊垁嫻併伄閫嗛</dc:creator><author>涓夊垁嫻併伄閫嗛</author><pubDate>Sat, 18 Jun 2011 18:02:00 GMT</pubDate><guid>http://www.tkk7.com/liuyxit/archive/2011/06/19/352605.html</guid><wfw:comment>http://www.tkk7.com/liuyxit/comments/352605.html</wfw:comment><comments>http://www.tkk7.com/liuyxit/archive/2011/06/19/352605.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/liuyxit/comments/commentRss/352605.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/liuyxit/services/trackbacks/352605.html</trackback:ping><description><![CDATA[mysql 澶у璞″瓨鍙? 綾誨瀷涓鑸簲璇ョ敤mediumblod, blob鍙兘瀛?鐨?6嬈℃柟涓猙yte, mediumblod鏄?4嬈℃柟, 涓鑸潵璇村鐢ㄤ簡(jiǎn).longblob鏄?2嬈℃柟鏈変簺澶? MYSQL榛樿閰嶇疆鍙兘瀛?M澶у皬鐨勬枃浠?瑕佷慨鏀歸厤緗?WIN鐗堟湰鐨勫湪mysql.ini鏂囦歡涓? 淇敼max_allowed_packet,net_buffer_length絳夊嚑涓弬鏁?鎴栫洿鎺ET GLOBAL varName=value. linux鐗堟湰鍙互鍦ㄥ惎鍔ㄥ弬鏁板悗鍔?max_allowed_packet=xxM絳夊嚑涓弬鏁? MYSQL瀛樺ぇ瀵硅薄鏈濂界洿鎺ュ氨setBinaryStream,鍙堝揩鍙堟柟渚? 鑰屼笉瑕佸厛鎻掑叆絀哄啀閫犲瀷鎴怋LOB鐒跺悗鍐峴etBlob 渚嬪瓙: import java.sql.*; import java.io.*; public class DBTest { static String driver = "org.gjt.mm.mysql.Driver"; static String url = "jdbc:mysql://localhost:3306/test"; static String user = "root"; static String passwd = "passwd"; public static void main(String[] args) throws Exception { Connection conn = null; try { Class.forName(driver); conn = DriverManager.getConnection(url,user,passwd); int op = 1; //鎻掑叆 if (op == 0) { PreparedStatement ps = conn.prepareStatement("insert into tb_file values (?,?)"); ps.setString(1, "aaa.exe"); InputStream in = new FileInputStream("d:/aaa.exe"); ps.setBinaryStream(2,in,in.available()); ps.executeUpdate(); ps.close(); } else { //鍙栧嚭 PreparedStatement ps = conn.prepareStatement("select * from tb_file where filename = ?"); ps.setString(1, "aaa.exe"); ResultSet rs = ps.executeQuery(); rs.next(); InputStream in = rs.getBinaryStream("filecontent"); System.out.println(in.available()); FileOutputStream out = new FileOutputStream("d:/bbb.exe"); byte[] b = new byte[1024]; int len = 0; while ( (len = in.read(b)) != -1) { out.write(b, 0, len); out.flush(); } out.close(); in.close(); rs.close(); ps.close(); } } catch (Exception ex) { ex.printStackTrace(System.out); } finally { try {conn.close();} catch (Exception ex) { } } } } sqlserver 澶у璞″瓨鍙栨病鏈変粈涔堝璇寸殑,鍙鏄痠mage綾誨瀷灝辮浜?娉ㄦ剰榪欐槸column綾誨瀷,鏈変漢浠ヤ負(fù)瀹冨彧鑳藉瓨 鍥捐薄.image鏄枃浠墮暅璞$殑鎰忔? import java.sql.*; import java.io.*; public class DBTest { static String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; static String url = "jdbc:microsoft:sqlserver://192.168.0.202:9999999999;DatabaseName=dddd"; static String user = "sa"; static String passwd = "ps"; public static void main(String[] args) throws Exception { Connection conn = null; try { Class.forName(driver); conn = DriverManager.getConnection(url,user,passwd); int op = 0; //鎻掑叆 if (op == 0) { PreparedStatement ps = conn.prepareStatement("insert into tb_file values (?,?)"); ps.setString(1, "aaa.exe"); InputStream in = new FileInputStream("d:/aaa.exe"); ps.setBinaryStream(2,in,in.available()); ps.executeUpdate(); ps.close(); } else { //鍙栧嚭 PreparedStatement ps = conn.prepareStatement("select * from tb_file where filename = ?"); ps.setString(1, "aaa.exe"); ResultSet rs = ps.executeQuery(); rs.next(); InputStream in = rs.getBinaryStream("filecontent"); System.out.println(in.available()); FileOutputStream out = new FileOutputStream("d:/bbb.exe"); byte[] b = new byte[1024]; int len = 0; while ( (len = in.read(b)) != -1) { out.write(b, 0, len); out.flush(); } out.close(); in.close(); rs.close(); ps.close(); } } catch (Exception ex) { ex.printStackTrace(System.out); } finally { try {conn.close();} catch (Exception ex) { } } } } ORACLE鐨勫ぇ瀵硅薄瀛樺偍鏈変簺鍙樻?瑕佹棤璁烘槸Blob,榪樻槸CLOB閮借姹傚厛鎻掑叆涓涓┖鍊?鐒跺悗 鏌ヨ騫墮攣瀹氳繖涓鏉¤褰?鑾峰彇瀵筁ob鐨勫紩鐢ㄥ啀榪涜濉厖,緗戜笂鏈夊お澶氱殑渚嬪瓙.鎴戜釜浜鴻涓? 榪欑鏂規(guī)硶鍨冨溇寰楄繛鍐欓兘涓嶆兂鍐欎簡(jiǎn),浣犲彲浠ヨ嚜宸卞幓鎼滅儲(chǔ)涓涓? 榪欑鐗瑰埆鐨勬搷浣滄棦澧炲姞鎿嶄綔鐨勫鏉傚害,鍙堣繚鍙嶄簡(jiǎn)JDBC鎺ュ彛鐨勮鑼?鎵浠ユ垜鏋佸姏鍙嶅榪欐牱 浣跨敤,濡傛灉浣犲拰鎴戞湁鍚屾牱鐨勮鐐?閭d箞鎴戞彁渚涘彟涓縐嶉氱敤鐨勬柟娉?灝辨槸浣犱笉鐢↙OB鑰岀敤 oracle鐨凩ONG RAW鏉ヤ唬鏇垮畠浠?榪欐牱灝卞彲浠ヨ薄鍏跺畠瀵硅薄涓鏍鋒搷浣滀簡(jiǎn): create table tb_file(filename varchar2(255),filecontent LONG RAW); import java.sql.*; import java.io.*; public class BlobTest { static String driver = "oracle.jdbc.driver.OracleDriver"; static String url = "jdbc:oracle:thin:@localhost:1521:test"; static String user = "system"; static String passwd = "passwd"; public static void main(String[] args) throws Exception { Connection conn = null; try { Class.forName(driver); conn = DriverManager.getConnection(url, user, passwd); int op = 1; //鎻掑叆 if (op == 0) { PreparedStatement ps = conn.prepareStatement("insert into tb_file values (?,?)"); ps.setString(1, "aaa.exe"); InputStream in = new FileInputStream("d:/aaa.exe"); ps.setBinaryStream(2,in,in.available()); ps.executeUpdate(); ps.close(); } else { //鍙栧嚭 PreparedStatement ps = conn.prepareStatement("select * from tb_file where filename = ?"); ps.setString(1, "aaa.exe"); ResultSet rs = ps.executeQuery(); rs.next(); InputStream in = rs.getBinaryStream("filecontent"); System.out.println(in.available()); FileOutputStream out = new FileOutputStream("d:/bbb.exe"); byte[] b = new byte[1024]; int len = 0; while ( (len = in.read(b)) != -1) { out.write(b, 0, len); out.flush(); } out.close(); in.close(); rs.close(); ps.close(); } } catch (Exception ex) { ex.printStackTrace(System.out); } finally { try { conn.close(); } catch (Exception ex) {} } } } 杞嚜錛歨ttp://dev.csdn.net/author/axman/1ca2ede425e44dba9ac20c2e262e4fb8.html <img src ="http://www.tkk7.com/liuyxit/aggbug/352605.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/liuyxit/" target="_blank">涓夊垁嫻併伄閫嗛</a> 2011-06-19 02:02 <a href="http://www.tkk7.com/liuyxit/archive/2011/06/19/352605.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[杞琞inputStream涓巄yte[]浜掕漿銆?/title><link>http://www.tkk7.com/liuyxit/archive/2011/06/19/inputStream_byte.html</link><dc:creator>涓夊垁嫻併伄閫嗛</dc:creator><author>涓夊垁嫻併伄閫嗛</author><pubDate>Sat, 18 Jun 2011 18:01:00 GMT</pubDate><guid>http://www.tkk7.com/liuyxit/archive/2011/06/19/inputStream_byte.html</guid><wfw:comment>http://www.tkk7.com/liuyxit/comments/352604.html</wfw:comment><comments>http://www.tkk7.com/liuyxit/archive/2011/06/19/inputStream_byte.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/liuyxit/comments/commentRss/352604.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/liuyxit/services/trackbacks/352604.html</trackback:ping><description><![CDATA[import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class FileByteUtil { public static void main(String[] args) throws Exception { File file=new File( "f:/test.doc "); byte[] fileByte = file2byte(file); byte2file(fileByte, "f:/test2.doc "); } public static byte[] file2byte(File f) throws Exception { return file2byte(f.getPath()); } public static byte[] file2byte(String f) throws Exception { try { InputStream in = new FileInputStream(f); byte[] tmp = new byte[512]; ByteArrayOutputStream out = new ByteArrayOutputStream(); int bytesRead = in.read(tmp); while (bytesRead != -1) { out.write(tmp, 0, bytesRead); bytesRead = in.read(tmp); } return out.toByteArray(); } catch (Exception e) { e.printStackTrace(); } return null; } // writes byte [] to a file public static void byte2file(byte[] data, String fn) throws Exception { try { OutputStream out = new FileOutputStream(fn); out.write(data); out.flush(); } catch (FileNotFoundException e) { throw e; } catch (IOException e) { throw e; } } }<img src ="http://www.tkk7.com/liuyxit/aggbug/352604.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/liuyxit/" target="_blank">涓夊垁嫻併伄閫嗛</a> 2011-06-19 02:01 <a href="http://www.tkk7.com/liuyxit/archive/2011/06/19/inputStream_byte.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://shguojing.com" target="_blank">日韩高清免费在线观看</a>| <a href="http://thinkchating.com" target="_blank">在线看片无码永久免费视频</a>| <a href="http://633223.com" target="_blank">亚洲福利在线播放</a>| <a href="http://www16am8.com" target="_blank">亚洲av无码偷拍在线观看</a>| <a href="http://7s8s.com" target="_blank">日韩av无码成人无码免费</a>| <a href="http://wwwfac37.com" target="_blank">亚洲制服丝袜中文字幕</a>| <a href="http://eldadhagar.com" target="_blank">4hu四虎最新免费地址</a>| <a href="http://jiuse54.com" target="_blank">亚洲不卡中文字幕</a>| <a href="http://www5g9.com" target="_blank">日本一区二区三区免费高清</a>| <a href="http://hnkangshi.com" target="_blank">亚洲最大无码中文字幕</a>| <a href="http://airou08.com" target="_blank">热99re久久免费视精品频软件</a>| <a href="http://tlyihong.com" target="_blank">亚洲Aⅴ在线无码播放毛片一线天</a>| <a href="http://junyehome.com" target="_blank">精品国产麻豆免费网站</a>| <a href="http://fanhaogo.com" target="_blank">MM1313亚洲国产精品</a>| <a href="http://worldbiao.com" target="_blank">亚洲国产一区二区三区</a>| <a href="http://fantoment.com" target="_blank">美女巨胸喷奶水视频www免费</a>| <a href="http://222941.com" target="_blank">亚洲AV永久无码区成人网站</a>| <a href="http://shunfk.com" target="_blank">97久久免费视频</a>| <a href="http://beijinzhongliuyiyuan.com" target="_blank">激情内射亚洲一区二区三区爱妻</a>| <a href="http://pchbgs.com" target="_blank">成年人在线免费观看</a>| <a href="http://gengyufood.com" target="_blank">美女黄色免费网站</a>| <a href="http://zjjtejia.com" target="_blank">亚洲日本一区二区三区在线</a>| <a href="http://www321fafa.com" target="_blank">中文字幕在线免费</a>| <a href="http://805ios.com" target="_blank">亚洲国产精品嫩草影院</a>| <a href="http://chinacry.com" target="_blank">国产亚洲精品a在线观看</a>| <a href="http://gzmandala.com" target="_blank">19禁啪啪无遮挡免费网站</a>| <a href="http://3333kkkk.com" target="_blank">亚洲中文无码亚洲人成影院</a>| <a href="http://wwkk3.com" target="_blank">亚洲精品综合久久</a>| <a href="http://luyifeile.com" target="_blank">亚洲视频免费在线观看</a>| <a href="http://91xqq.com" target="_blank">亚洲免费综合色在线视频</a>| <a href="http://43sihu.com" target="_blank">国产精品亚洲mnbav网站</a>| <a href="http://cztbm.com" target="_blank">足恋玩丝袜脚视频免费网站</a>| <a href="http://zjszbwzl.com" target="_blank">亚洲JIZZJIZZ妇女</a>| <a href="http://sxhengshan.com" target="_blank">亚洲精品成人无限看</a>| <a href="http://6464k.com" target="_blank">最近最新中文字幕完整版免费高清</a>| <a href="http://yxjcgs.com" target="_blank">免费国产草莓视频在线观看黄</a>| <a href="http://tha2008.com" target="_blank">久久亚洲精精品中文字幕</a>| <a href="http://ge2hao.com" target="_blank">国产成人涩涩涩视频在线观看免费 </a>| <a href="http://www678678.com" target="_blank">亚洲韩国—中文字幕</a>| <a href="http://wwwabxx.com" target="_blank">18禁成年无码免费网站无遮挡</a>| <a href="http://nyminer.com" target="_blank">九九视频高清视频免费观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>