锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩福利一区,中文字幕一区av,懂色av影视一区二区三区 http://www.aygfsteel.com/javaby/category/2189.htmljava鐨勪氦嫻佷粠榪欓噷寮濮?/description>zh-cn Wed, 28 Feb 2007 05:50:57 GMT Wed, 28 Feb 2007 05:50:57 GMT 60 瀵筽roperties鏂囦歡鐨勬搷浣? - http://www.aygfsteel.com/javaby/articles/45858.htmlJava BY Java BY Fri, 12 May 2006 07:50:00 GMT http://www.aygfsteel.com/javaby/articles/45858.html http://www.aygfsteel.com/javaby/comments/45858.html http://www.aygfsteel.com/javaby/articles/45858.html#Feedback 0 http://www.aygfsteel.com/javaby/comments/commentRss/45858.html http://www.aygfsteel.com/javaby/services/trackbacks/45858.html 聽聽聽聽聽聽聽聽聽 聽try {聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽 File file = new File(System.getProperty("user.dir") 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 + "/EMweb/WEB-INF/admininfo.properties"); 聽聽聽聽聽聽聽聽聽聽聽 InputStream is = new FileInputStream(file);
聽聽聽聽聽聽聽聽聽聽聽 props.load(is);
聽聽聽聽聽聽聽聽聽聽聽 this.userName = props.getProperty("userName"); 聽聽聽聽聽聽聽聽聽聽聽 this.userPassWord = props.getProperty("userPassWord"); 聽聽聽聽聽聽聽聽聽聽聽 is.close(); 聽聽聽聽聽聽聽 } catch (Exception e) { 聽聽聽聽聽聽聽聽聽聽聽 e.printStackTrace(); 聽聽聽聽聽聽聽 }
聽聽聽聽聽 鏇存敼properties鏂囦歡
聽聽聽聽聽聽聽 Properties prop = new Properties(); 聽聽聽聽聽聽聽 File file = new File(System.getProperty("user.dir") 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 + "/EMweb/WEB-INF/admininfo.properties"); 聽聽聽聽聽聽聽 prop.setProperty("userName", String.valueOf(cUserName)); 聽聽聽聽聽聽聽 prop.setProperty("userPassWord", String.valueOf(cUserPassWord)); 聽聽聽聽聽聽聽 try { 聽聽聽聽聽聽聽聽聽聽聽 OutputStream fos = new FileOutputStream(file); 聽聽聽聽聽聽聽聽聽聽聽 prop.store(fos, "admininfo.properties"); 聽聽聽聽聽聽聽聽聽聽聽 fos.close(); 聽聽聽聽聽聽聽 } catch (FileNotFoundException ex) { 聽聽聽聽聽聽聽聽聽聽聽 ex.printStackTrace(); 聽聽聽聽聽聽聽 } catch (IOException ex) { 聽聽聽聽聽聽聽聽聽聽聽 ex.printStackTrace(); 聽聽聽聽聽聽聽 }
榪欓噷闈㈢殑鍏抽敭鏄疭ystem.getProperty("user.dir") 榪斿洖褰撳墠宸ヤ綔鐩綍
]]>鐢?Servlets 鍔ㄦ佺敓鎴愬浘鐗?/title> http://www.aygfsteel.com/javaby/articles/27286.htmlJava BY Java BY Mon, 09 Jan 2006 09:54:00 GMT http://www.aygfsteel.com/javaby/articles/27286.html http://www.aygfsteel.com/javaby/comments/27286.html http://www.aygfsteel.com/javaby/articles/27286.html#Feedback 0 http://www.aygfsteel.com/javaby/comments/commentRss/27286.html http://www.aygfsteel.com/javaby/services/trackbacks/27286.html 銆銆濡傛灉浣犵殑 servlet 瑕佸姩鎬佺敓鎴愬浘璞★紝棣栧厛浣犻渶瑕?image I/O錛屾槑紜殑璇達紝浣犻渶瑕佺敓鎴愪竴鍥劇墖鏉ュ搷搴擧TTP璇鋒眰銆傛牳蹇?Java API 娌℃湁鐩存帴鎻愪緵鐢ㄤ簬淇濇寔浠諱綍鍥捐薄鐨勫姛鑳姐傜劧鑰岋紝浣犲彲浠ョ敤 Sun 鐨?Java 1.1 綾誨簱鏉ュ仛 image I/O銆傝屼笖 Sun 鐨?1.2 鐗堢殑 image I/O 鎻愪緵浜嗗 JPEG 鍥捐薄榪涜緙栫爜鍜岃В鐮佺殑鍖呫傚洜涓鴻繖浜涗唬鐮佸湪 com.sun 鍖呬腑錛屼笉鏄牳蹇傾PI鐨勪竴閮ㄥ垎錛屼篃涓嶆槸鏍囧噯鐨勬墿灞曞寘錛屽洜姝わ紝浼氬獎鍝嶄唬鐮佺殑鍙Щ妞嶆с?/P>
銆銆浣跨敤 jdk 1.2 灝嗘瘮 jdk 1.1 鐗堝鏄撶殑澶氾紝鏈枃浠嬬粛 jdk 1.2 涓嬬殑瀹炵幇鏂規硶銆傜ず渚嬫湁涓変釜姝ラ錛氬垱寤恒佺粯鍒躲佷繚瀛樸傚湪鏈緥浠呬粎紺鴻寖濡備綍鐢諱竴涓き鍦嗭紝褰撶劧浣犲彲浠ユ牴鎹綘鐨勯渶瑕佷慨鏀廣備緥瀛愪嬌鐢ㄤ簡 com.sun.image.codec.jpeg 鍖呯敓鎴?JPEG 鏂囦歡銆傚鏋滆鐢熸垚 GIF 鏂囦歡錛屼綘鍙互浣跨敤絎笁鏂圭殑鍖咃紝濡?Acme Labs 鐨?GIF Encoder 銆?/P>
1. 浣跨敤閫傚綋鐨勫昂瀵稿垱寤轟竴涓?BufferedImage 瀵硅薄錛?BR>BufferedImage 銆image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
2. 鍦?image 瀵硅薄涓婄粯鍒朵綘鎯寵鐨勫浘璞°傚亣璁句綘鎯寵涓涓櫧鑹茬殑鑳屾櫙錛屼綘闇瑕佺敾涓涓櫧鑹插~鍏呯殑鐭╁艦銆傚惁鍒欒儗鏅皢鏄己鐪佺殑榛戣壊錛?/P>
銆Graphics g = image.getGraphics(); 銆銆g.setColor(Color.white); 銆銆g.fillRect(0,0, width, height); 銆銆g.setColor(Color.red); 銆銆g.drawOval(0, 0, width, height);
3. 浣跨敤 com.sun.image.codec.jpeg 鍖呰緭鍑?BufferedImage錛?/P>
銆response.setContentType("image/jpeg"); 銆ServletOutputStream out = response.getOutputStream(); 銆 銆JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); 銆encoder.encode(image); 銆out.close();
]]> Struts 瀛︿範絎旇錛堜簩錛?/title> http://www.aygfsteel.com/javaby/articles/8050.htmlJava BY Java BY Wed, 20 Jul 2005 07:59:00 GMT http://www.aygfsteel.com/javaby/articles/8050.html http://www.aygfsteel.com/javaby/comments/8050.html http://www.aygfsteel.com/javaby/articles/8050.html#Feedback 0 http://www.aygfsteel.com/javaby/comments/commentRss/8050.html http://www.aygfsteel.com/javaby/services/trackbacks/8050.html 澶ф鐨勫唴瀹逛富瑕佽榪頒簡HTTP鍗忚鐨勮姹傚拰鐩稿簲錛屼互鍙奀ookie鐨勫伐浣滃師鐞嗭紝鎴戣涓烘病鏈変粈涔堝彲浠ヨ褰曠殑錛屽ぇ閮ㄥ垎閮芥槸姒傚康錛屼篃璁告病鏈変竴涓▼搴忎細璁╀綘鍐欐蹇電殑錛屽張涓嶆槸閭f灟鐕ョ殑鑰冭瘯錛屾墍浠ヤ簡瑙e氨濂戒簡銆?img src ="http://www.aygfsteel.com/javaby/aggbug/8050.html" width = "1" height = "1" /> ]]> Struts瀛︿範絎旇錛堜竴錛?/title> http://www.aygfsteel.com/javaby/articles/7992.htmlJava BY Java BY Tue, 19 Jul 2005 07:44:00 GMT http://www.aygfsteel.com/javaby/articles/7992.html http://www.aygfsteel.com/javaby/comments/7992.html http://www.aygfsteel.com/javaby/articles/7992.html#Feedback 0 http://www.aygfsteel.com/javaby/comments/commentRss/7992.html http://www.aygfsteel.com/javaby/services/trackbacks/7992.html 闃呰鍏ㄦ枃 ]]>
主站蜘蛛池模板:
临湘市 |
遂川县 |
新干县 |
南通市 |
蓝田县 |
扶风县 |
桐柏县 |
寿宁县 |
罗江县 |
石楼县 |
馆陶县 |
渭南市 |
大安市 |
探索 |
五莲县 |
怀来县 |
英德市 |
平顺县 |
阳西县 |
木里 |
万宁市 |
永宁县 |
沁源县 |
朝阳县 |
北辰区 |
双江 |
于田县 |
宁强县 |
景德镇市 |
建湖县 |
车致 |
三门峡市 |
诏安县 |
高邑县 |
广元市 |
鄂尔多斯市 |
鹤岗市 |
瑞丽市 |
兴化市 |
招远市 |
南郑县 |