锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日批日出水久久亚洲精品tv,亚洲一区二区三区播放在线,亚洲午夜久久久精品影院 http://m.tkk7.com/jam/zh-cn Sun, 11 May 2025 04:40:28 GMT Sun, 11 May 2025 04:40:28 GMT 60 xml闈㈣瘯鏂歸潰闂 http://m.tkk7.com/jam/archive/2005/08/22/10697.htmljam jam Mon, 22 Aug 2005 07:08:00 GMT http://m.tkk7.com/jam/archive/2005/08/22/10697.html http://m.tkk7.com/jam/comments/10697.html http://m.tkk7.com/jam/archive/2005/08/22/10697.html#Feedback 0 http://m.tkk7.com/jam/comments/commentRss/10697.html http://m.tkk7.com/jam/services/trackbacks/10697.html 絳?鏈塂OM,SAX,STAX絳? DOM:澶勭悊澶у瀷鏂囦歡鏃跺叾鎬ц兘涓嬮檷鐨勯潪甯稿帀瀹熾傝繖涓棶棰樻槸鐢盌OM鐨勬爲(wèi)緇撴瀯鎵閫犳垚鐨勶紝榪欑緇撴瀯鍗犵敤鐨勫唴瀛樿緝澶氾紝鑰屼笖DOM蹇呴』鍦ㄨВ鏋愭枃浠朵箣鍓嶆妸鏁翠釜鏂囨。瑁呭叆鍐呭瓨,閫傚悎瀵筙ML鐨勯殢鏈鴻闂甋AX:涓嶇幇浜嶥OM,SAX鏄簨浠墮┍鍔ㄥ瀷鐨刋ML瑙f瀽鏂瑰紡銆傚畠欏哄簭璇誨彇XML鏂囦歡錛屼笉闇瑕佷竴嬈″叏閮ㄨ杞芥暣涓枃浠躲傚綋閬囧埌鍍忔枃浠跺紑澶達紝鏂囨。緇撴潫錛屾垨鑰呮爣絳懼紑澶翠笌鏍囩緇撴潫鏃訛紝瀹冧細瑙﹀彂涓涓簨浠訛紝鐢ㄦ埛閫氳繃鍦ㄥ叾鍥炶皟浜嬩歡涓啓鍏ュ鐞嗕唬鐮佹潵澶勭悊XML鏂囦歡錛岄傚悎瀵筙ML鐨勯『搴忚闂? STAX:Streaming API for XML (StAX) 2銆佷綘鍦ㄩ」鐩腑鐢ㄥ埌浜唜ml鎶鏈殑鍝簺鏂歸潰?濡備綍瀹炵幇鐨? 絳?鐢ㄥ埌浜嗘暟鎹瓨璐紝淇℃伅閰嶇疆涓ゆ柟闈€傚湪鍋氭暟鎹氦鎹㈠鉤鍙版椂錛屽皢涓嶈兘鏁版嵁婧愮殑鏁版嵁緇勮鎴怷ML鏂囦歡錛岀劧鍚庡皢XML鏂囦歡鍘嬬緝鎵撳寘鍔犲瘑鍚庨氳繃緗戠粶浼犻佺粰鎺ユ敹鑰咃紝鎺ユ敹瑙e瘑涓庤В鍘嬬緝鍚庡啀鍚孹ML鏂囦歡涓繕鍘熺浉鍏充俊鎭繘琛屽鐞嗐傚湪鍋氳蔣浠墮厤緗椂錛屽埄鐢╔ML鍙互寰堟柟渚跨殑榪涜錛岃蔣浠剁殑鍚勭閰嶇疆鍙傛暟閮藉瓨璐湪XML鏂囦歡涓? 3銆佺敤jdom瑙f瀽xml鏂囦歡鏃跺浣曡В鍐充腑鏂囬棶棰?濡備綍瑙f瀽? 絳?鐪嬪涓嬩唬鐮?鐢ㄧ紪鐮佹柟寮忓姞浠ヨВ鍐? package test; import java.io.*; public class DOMTest { private String inFile = "c:\people.xml"; private String outFile = "c:\people.xml"; public static void main(String args[]) { new DOMTest(); } public DOMTest() { try { javax.xml.parsers.DocumentBuilder builder = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder(); org.w3c.dom.Document doc = builder.newDocument(); org.w3c.dom.Element root = doc.createElement("鑰佸笀"); org.w3c.dom.Element wang = doc.createElement("鐜?); org.w3c.dom.Element liu = doc.createElement("鍒?); wang.appendChild(doc.createTextNode("鎴戞槸鐜嬭佸笀")); root.appendChild(wang); doc.appendChild(root); javax.xml.transform.Transformer transformer = javax.xml.transform.TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(javax.xml.transform.OutputKeys.ENCODING, "gb2312"); transformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT, "yes"); transformer.transform(new javax.xml.transform.dom.DOMSource(doc), new javax.xml.transform.stream.StreamResult(outFile)); } catch (Exception e) { System.out.println (e.getMessage()); } } } ]]>java闈㈣瘯棰樹箣涓 http://m.tkk7.com/jam/archive/2005/08/22/10692.htmljam jam Mon, 22 Aug 2005 06:25:00 GMT http://m.tkk7.com/jam/archive/2005/08/22/10692.html http://m.tkk7.com/jam/comments/10692.html http://m.tkk7.com/jam/archive/2005/08/22/10692.html#Feedback 8 http://m.tkk7.com/jam/comments/commentRss/10692.html http://m.tkk7.com/jam/services/trackbacks/10692.html
String subString(String str, int i) { String strReturn = "" ; if (str.equals( "" ) || str == null || i == 0 ) { return "" ; } for ( int j = 1 ; j <= str.length(); j ++ ) { String temp = "" ; temp = str.substring( 0 , j); if (temp.getBytes().length >= i) { if (temp.substring(j - 1 , j).getBytes().length == 1 ) { strReturn = temp; } else { strReturn = str.substring( 0 , j - 1 ); } break ; } } return strReturn; } 浠ヤ笂鏄痡ava闈㈣瘯棰橈細 鈥滅紪紼嬶細緙栧啓涓涓埅鍙栧瓧絎︿覆鐨勫嚱鏁幫紝杈撳叆涓轟竴涓瓧絎︿覆鍜屽瓧鑺傛暟錛岃緭鍑轟負鎸夊瓧鑺傛暟 浣嗘槸瑕佷繚璇佹眽瀛椾笉琚埅鍗婁釜錛屽鈥滄垜ABC鈥?錛屽簲璇ユ埅涓衡滄垜AB鈥濓紝杈撳叆鈥滄垜ABC姹塂EF鈥濓紝6錛屽簲璇ヨ緭鍑轟負鈥滄垜ABC鈥濊屼笉鏄滄垜ABC+姹夌殑鍗婁釜鈥濄?鈥?img src ="http://m.tkk7.com/jam/aggbug/10692.html" width = "1" height = "1" /> ]]> java 瓚呭ぇ鏁板瓧鐨勫姞榪愮畻錛堟湭瀹屽杽錛?/title> http://m.tkk7.com/jam/archive/2005/08/22/10680.htmljam jam Mon, 22 Aug 2005 04:31:00 GMT http://m.tkk7.com/jam/archive/2005/08/22/10680.html http://m.tkk7.com/jam/comments/10680.html http://m.tkk7.com/jam/archive/2005/08/22/10680.html#Feedback 0 http://m.tkk7.com/jam/comments/commentRss/10680.html http://m.tkk7.com/jam/services/trackbacks/10680.html
1 package test; 2 3 public class BigInt { 4 public static void main(String arg[]) { 5 new BigInt(); 6 } 7 8 public BigInt() { 9 String bigInt1 = 10 " 12312311111111111111111111111111111111113132135135465464646546455545 " ; 11 String bigInt2 = 12 " 12312311111111111111111111111111111111113132135135465464646546455545 " ; 13 int [] iArr1 = arr(bigInt1); 14 int [] iArr2 = arr(bigInt2); 15 int [] iArr3 = new int [iArr2.length]; 16 int iTemp = 0 ; 17 String flag = "" ; 18 for ( int i = 0 ; i < iArr1.length; i ++ ) { 19 if (flag.equals( " add " )) { 20 iTemp = iArr1[i] + iArr2[i] + 1 ; ; 21 }22 else { 23 iTemp = iArr1[i] + iArr2[i]; 24 }25 flag = "" ; 26 if (iTemp > 9999 ) { 27 iTemp = iTemp - 10000 ; 28 flag = " add " ; 29 }30 31 iArr3[i] = iTemp; 32 }33 String temp = "" ; 34 for ( int i = 0 ; i < iArr3.length; i ++ ) { 35 36 if (iArr3[i] < 10 ) { 37 temp = " 000 " + String.valueOf(iArr3[i]) + temp; 38 39 }40 else if (iArr3[i] < 100 ) { 41 temp = " 00 " + String.valueOf(iArr3[i]) + temp; 42 }43 else if (iArr3[i] < 1000 ) { 44 temp = " 0 " + String.valueOf(iArr3[i]) + temp; 45 }46 else { 47 temp = String.valueOf(iArr3[i]) + temp; 48 }49 50 }51 System.out .println(temp); 52 }53 54 int [] arr(String s) { 55 int j = s.length() / 4 ; 56 57 int [] ArrOne = new int [j + 1 ]; 58 int iLength; 59 iLength = s.length(); 60 61 for ( int i = 0 ; i < j; i ++ ) 62 63 { 64 65 ArrOne[i] = Integer.parseInt(s.substring(iLength - 4 * (i + 1 ), 66 iLength - 4 * i)); 67 68 }69 70 return ArrOne; 71 72 }73 }74 ]]> java ipadress 媯鏌?/title> http://m.tkk7.com/jam/archive/2005/08/11/9797.htmljam jam Thu, 11 Aug 2005 04:50:00 GMT http://m.tkk7.com/jam/archive/2005/08/11/9797.html http://m.tkk7.com/jam/comments/9797.html http://m.tkk7.com/jam/archive/2005/08/11/9797.html#Feedback 0 http://m.tkk7.com/jam/comments/commentRss/9797.html http://m.tkk7.com/jam/services/trackbacks/9797.html
1 /**/ /* * 2 * check input is ip or not. 3 * @return a strResult.1 is not ip adress,0 is ipadress 4 */ 5 6 private String checkIPAdress(String input) { 7 8 String strResult = " 0 " ; 9 // identify the length of the string 10 if (input.length() < 7 || input.length() > 15 ) { 11 return " 1 " ; 12 }13 14 int startIndex = 0 ; 15 Vector v = new Vector(); 16 int index = 0 ; 17 startIndex = input.indexOf( " . " ); 18 while (startIndex < input.length() && startIndex != - 1 ) { 19 String temp = input.substring(index, startIndex); 20 v.addElement(temp);21 index = startIndex + 1 ; 22 startIndex = input.indexOf( " . " , startIndex + 1 ); 23 }24 v.addElement(input.substring(index));25 if (v.size() != 4 ) { 26 return " 1 " ; 27 }28 for ( int i = 0 ; i < v.size(); i ++ ) { 29 try { 30 int iTemp = Integer.parseInt( (String) v.elementAt(i)); 31 32 if (iTemp < 0 || iTemp > 254 ) { 33 34 return " 1 " ; 35 }36 37 }38 catch (Exception e) { 39 e.printStackTrace();40 return " 1 " ; 41 }42 43 }44 45 return strResult; 46 47 } 璧峰鍦ㄥ垽鏂垎鍓瞚p鍦板潃搴旇浣跨敤split鏂規(guī)硶銆備絾鏄洜涓烘垜緋葷粺涓敤鐨勬槸jdk1.2鎵浠ラ噰鐢ㄨ繖涓鏂規(guī)硶錛屽鏋滆寰椾笉鐖藉彲浠ユ敼鎴恠plit錛屾洿鏂逛究銆?img src ="http://m.tkk7.com/jam/aggbug/9797.html" width = "1" height = "1" /> ]]> EJB浠嬬粛 http://m.tkk7.com/jam/archive/2005/08/05/9362.htmljam jam Fri, 05 Aug 2005 01:25:00 GMT http://m.tkk7.com/jam/archive/2005/08/05/9362.html http://m.tkk7.com/jam/comments/9362.html http://m.tkk7.com/jam/archive/2005/08/05/9362.html#Feedback 1 http://m.tkk7.com/jam/comments/commentRss/9362.html http://m.tkk7.com/jam/services/trackbacks/9362.html 闃呰鍏ㄦ枃 ]]> 闅忎究鍐欎竴涓紝java鐢熸垚闅忔満鏁板瓧 http://m.tkk7.com/jam/archive/2005/08/04/9208.htmljam jam Thu, 04 Aug 2005 06:43:00 GMT http://m.tkk7.com/jam/archive/2005/08/04/9208.html http://m.tkk7.com/jam/comments/9208.html http://m.tkk7.com/jam/archive/2005/08/04/9208.html#Feedback 1 http://m.tkk7.com/jam/comments/commentRss/9208.html http://m.tkk7.com/jam/services/trackbacks/9208.html
1 Random random = new Random(); 2 String sRand = "" ; 3 for ( int i = 0 ; i < 4 ; i ++ ) { 4 String rand = String.valueOf(random.nextInt( 10 )); 5 sRand += rand; 6 }7 System.out .println( " 4 random number is " + sRand); ]]> Java涓疄鐜板UTF8杞崲鐨勫疄鐜版柟娉?/title> http://m.tkk7.com/jam/archive/2005/08/02/9035.htmljam jam Tue, 02 Aug 2005 07:48:00 GMT http://m.tkk7.com/jam/archive/2005/08/02/9035.html http://m.tkk7.com/jam/comments/9035.html http://m.tkk7.com/jam/archive/2005/08/02/9035.html#Feedback 0 http://m.tkk7.com/jam/comments/commentRss/9035.html http://m.tkk7.com/jam/services/trackbacks/9035.html byte temp[] = str.getBytes("8859_1"); strResult = new String(temp, "UTF8"); 浣嗘槸緇忚繃鎴戞祴璇曪紝鍙戠幇杞崲涓嶆紜傛病鏈夋紜漿鎹㈡垚UTF銆?BR>涓嬮潰緇欏嚭鎴戠殑瀹炵幇鏂規(guī)硶錛?BR>
1 private OutputStreamWriter outputwriter = null ; 2 3 outputwriter = new OutputStreamWriter( out , " UTF-8 " ); 4 outputwriter.write(strValue, 0 , strValue.length()); 榪欐牱灝眔k浜嗭紝嫻嬭瘯鏂規(guī)硶錛屽皢杞崲鍚庣殑瀛楃涓詫紝鐢║Ltra鎵撳紑錛岃繘琛屽瓧絎﹁漿鎹TF鍒癆SCII濡傛灉涓嶆槸涔辯爜灝監(jiān)K浜嗭紒 ]]> java鍐檖roperties鏂囦歡鐨勬柟娉?/title> http://m.tkk7.com/jam/archive/2005/08/02/9033.htmljam jam Tue, 02 Aug 2005 07:41:00 GMT http://m.tkk7.com/jam/archive/2005/08/02/9033.html http://m.tkk7.com/jam/comments/9033.html http://m.tkk7.com/jam/archive/2005/08/02/9033.html#Feedback 0 http://m.tkk7.com/jam/comments/commentRss/9033.html http://m.tkk7.com/jam/services/trackbacks/9033.html
1 /**/ /* * 2 * write property. 3 * @param title parameter defined in properties file 4 * @param key parameter defined title value 5 * @return String return value 6 */ 7 String writeProp(String filePath, String fileName, String title, String key, 8 Logger logger) { 9 10 String strResult = "" ; 11 String pathAddFile = "" ; // write file with path and name 12 String tempFile = "" ; 13 String strTemp = "" ; // use for identify if the modify is success 14 // filePath is null the file in the default path ,else file in the filePath+\+fileName 15 if (filePath.equals( "" )) { 16 pathAddFile = fileName; 17 tempFile = " temp.properties " ; 18 } 19 else { 20 pathAddFile = filePath + systemSeparator + fileName; 21 tempFile = filePath + systemSeparator + " temp.properties " ; 22 } 23 // properties file 24 File aFile = new File(pathAddFile); 25 // temp file 26 File tFile = new File(tempFile); 27 if ( ! aFile.exists()) { 31 strResult = " error " ; 32 return strResult; 33 } 34 // set property to properties 35 try { 36 FileReader fr = new FileReader(pathAddFile); 37 38 BufferedReader br = new BufferedReader(fr); 39 try { 40 FileWriter fw = new FileWriter(tempFile); 41 PrintWriter out = new PrintWriter(fw); 42 43 String strLine = br.readLine().trim(); 44 while (strLine != null ) { 45 // identify if strLine have title,have change key 46 if (strLine.startsWith(title)) { 47 strLine = title + " = " + key; 48 strTemp = " 1 " ; 49 } 50 out .write(strLine); 51 out .println(); 52 out .flush(); 53 // read next line 54 strLine = br.readLine(); 55 } 56 fw.close(); 57 out .close(); 58 // close BufferedReader object 59 br.close(); 60 // close file 61 fr.close(); 62 // delete properties file 63 if (aFile.exists()) { 64 if ( ! aFile.delete()) { 68 return " error " ; 69 } 70 } 71 // rename temp file to properties file 72 if ( ! tFile.exists()) { 76 return " error " ; 77 } 78 tFile.renameTo(aFile); 79 if ( ! strTemp.equals( " 1 " )) { 80 // there is no title prop exit so modify failed 85 strResult = " error " ; 86 87 } 88 return strResult; 89 } 90 catch (IOException ex2) { 91 ex2.printStackTrace(); 92 strResult = " error " ; 93 logger.fatal( 94 " CmnEToyotaExtractProp ----- writeProp ----- failed ! " ); 95 return strResult; 96 97 } 98 } 99 catch (FileNotFoundException ex1) { 100 ex1.printStackTrace();103 strResult = " error " ; 104 return strResult; 105 }106 107 } 璇ユ柟娉曞疄鐜頒簡瀵瑰睘鎬ф枃浠跺弬鏁扮殑淇敼銆?img src ="http://m.tkk7.com/jam/aggbug/9033.html" width = "1" height = "1" /> ]]> java鎴戞潵浜?/title> http://m.tkk7.com/jam/archive/2005/08/02/9032.htmljam jam Tue, 02 Aug 2005 07:34:00 GMT http://m.tkk7.com/jam/archive/2005/08/02/9032.html http://m.tkk7.com/jam/comments/9032.html http://m.tkk7.com/jam/archive/2005/08/02/9032.html#Feedback 0 http://m.tkk7.com/jam/comments/commentRss/9032.html http://m.tkk7.com/jam/services/trackbacks/9032.html ]]>
主站蜘蛛池模板:
亚洲中文久久精品无码ww16 |
一区二区三区观看免费中文视频在线播放
|
亚洲精品蜜夜内射 |
久久精品国产亚洲av麻豆图片
|
国产成人亚洲精品青草天美 |
不卡精品国产_亚洲人成在线 |
亚洲人成影院在线无码观看 |
亚洲国产小视频精品久久久三级 |
亚洲福利精品电影在线观看 |
亚洲Av无码乱码在线观看性色 |
亚洲国模精品一区 |
亚洲综合AV在线在线播放 |
亚洲国产精品无码成人片久久 |
亚洲爱情岛论坛永久 |
久久精品a亚洲国产v高清不卡 |
亚洲精品在线视频观看 |
亚洲一区二区三区久久久久 |
亚洲色偷偷综合亚洲av78 |
香蕉97碰碰视频免费 |
一区视频免费观看 |
久久久久久国产精品免费免费男同 |
免费女人高潮流视频在线观看 |
亚洲三级高清免费 |
四虎免费影院4hu永久免费 |
国产成人精品曰本亚洲79ren |
国产AV无码专区亚洲AVJULIA |
亚洲国产精品久久网午夜 |
亚洲中文字幕乱码一区 |
一级做a爰片性色毛片免费网站 |
四虎影视无码永久免费 |
蜜臀98精品国产免费观看 |
成人免费a级毛片无码网站入口
|
国产啪精品视频网免费 |
欧洲精品免费一区二区三区 |
亚洲国产高清在线一区二区三区 |
亚洲精品无码不卡在线播放HE |
亚洲最大黄色网址 |
色噜噜的亚洲男人的天堂 |
日韩精品在线免费观看 |
成人免费无码大片A毛片抽搐色欲 |
亚洲国产精品视频 |