×î½ü¿ªÊ¼ÔÚѧϰJAVA£¬´ÓÍøÉÏ¿´ÁË¡¶JAVA×Ôѧ֮·¡·¡£
JAVA×Ôѧ֮·
1 Ò»£ºJ2SE ÃæÏò¶ÔÏó£·â×°¡¢¼Ì³Ð¡¢¶à̬ 2 ÄÚ´æµÄ·ÖÎö 3 µÝ¹é 4 ¼¯ºÏÀà¡¢·ºÐÍ¡¢×Ô¶¯´ò°üÓë½â°ü¡¢Annotation 5 IO 6 ¶àÏ̡߳¢Ïß³Ìͬ²½ 7 TCP/UDP 8 AWT¡¢Ê¼þÄ£ÐÍ¡¢ÄäÃûÀà 9 ÕýÔò±í´ïʽ 10 ·´Éä»úÖÆ 11 2£ºÊý¾Ý¿â£¨Oracle»òÕßMySQL£© 12 SQLÓï¾ä 13 ¶à±íÁ¬½Ó£¬ÄÚÍâÁ¬½Ó£¬ ×Ó²éѯµÈ 14 ¹ÜÀí±í¡¢ÊÓͼ¡¢Ë÷Òý¡¢ÐòÁС¢Ô¼ÊøµÈ 15 Ê÷×´½á¹¹´æ´¢ 16 ´æ´¢¹ý³Ì¡¢´¥·¢Æ÷ 17 Êý¾Ý¿âÉè¼ÆÈý·¶Ê½¡¢ 18 3£ºJDBC 19 JDBC»ù´¡ 20 Á¬½Ó³Ø 21 Ê÷×´½á¹¹´æ´¢ÓëÕ¹ÏÖ 22 DataSource & RowSet 23 JDBCÁ¬½ÓOracle¼°MySQL 24 25 4£ºHTML_CSS_JAVASCRIPT 26 html¡¢css¡¢javascript»ù´¡Óï·¨ 27 JavaScript FormÅÐ¶Ï 28 Dom±à³Ì»ù´¡£¨Ê¼þ´¦ÀíµÈ£© 29 JS³£ÓÃЧ¹ûÈçTreeView¡¢ÏÂÀÁª¶¯µÈ 30 JSѧϰ·½·¨ 31 JSµ÷ÊÔ·½·¨ 32 DreamWeaver³õ²½£¨½¨Á¢HTML¡¢Table¡¢Form¡¢CSS£©µÈ 33 5£ºServlet & JSP 34 tomcat»ù´¡ 35 servlet»ù´¡ 36 web.xmlÅäÖûù´¡ 37 web applicationµÄ½á¹¹ 38 servletÉúÃüÖÜÆÚ 39 request responseµÈ³£Ó÷½·¨ 40 ServletContextÀà 41 HTTPÐÒé»ù´¡£¨GET POST£© 42 Cookie 43 Session 44 Application 45 JSPµÄ¼¸ÖÖÓï·¨£¨°üÀ¨JSTLµÈ£©×¢ÒâÔÚÏîÄ¿ÖÐÁ·Ï°£¬²»Òª¾ÐÄàÓÚÓ﷨ϸ½Ú¶ø¹ü²½²»Ç°¡£ 46 6£ºStruts 47 ¶à²ã¼Ü¹¹ÀíÂÛ 48 Model 1 and Model 2 49 Struts»ù±¾¸ÅÄî 50 MVC 51 ActionÓëÒµÎñÂß¼ÀàµÄ¹Øϵ 52 ÔÚStrutsÓëJSPÖ®¼ä´«µÝÊý¾Ý 53 Struts´¦ÀíÁ÷³Ì£¨¿ØÖÆÁ÷£© 54 Struts TagLib£¨Á˽ⳣÓõģ© 55 JSTL 56 ActionForm 57 ×Ö¶ÎÊÕ¼¯ 58 ÉÏ´«Îļþ 59 ÀàÐÍת»» 60 DTO 61 ¶¯Ì¬Action Form 62 ÑéÖ¤¿ò¼Ü 63 ActionForward ת·¢ÓëÖض¨Ïò 64 ¶¯Ì¬Éú³ÉActionForward 65 È«¾ÖÓë¾Ö²¿µÄActionForward 66 Action Forward Scope 67 UnknownActionMapping 68 ActionµÄḬ̈߳²È« 69 I18N 70 ÈçºÎÇл»ÓïÑÔ»·¾³ 71 StrutsÒì³£´¦Àí»úÖÆ ³ÌÐò´¦Àí ×Ô¶¯´¦Àí ×Ô¶¨ÒåÒì³£´¦ÀíÆ÷ 72 StrutsµÄ¶àÄ£¿éÅäÖà 73 74 7£ºXML 75 £¨XML/XSL¡¢XSLT/DTD¡¢SCHEMAµÈ»ù´¡µÄ¸ÅÄî¡¢¹ØÓÚJavaµÄ±à³Ì¿ÉÒÔÔÝʱÈÓÔÚÒ»±ß£© 76 8£ºHibernate 77 OR MappingÔÀí 78 Hibernate»ù´¡¿ª·¢²½Öè 79 Hibernate»ù±¾½Ó¿Ú£¨ÖصãSession£© 80 ÆÕͨÊôÐÔÓ³Éä 81 ¹ØÁª¹ØϵӳÉä 82 Native SQL 83 inverse lazy cascade 84 ¼Ì³Ð¹ØϵӳÉä 85 HQL 86 ÐÔÄÜÓÅ»¯ Ò»¼¶»º´æ ¶þ¼¶»º´æ ²éѯ»º´æ 87 ÊÂÎñÓë²¢·¢ ±¯¹ÛËø¡¢ÀÖ¹ÛËø 88 OpenSessionInView 89 CurrentSession 90 £¨ÖÁÓÚJTA¡¢ÁªºÏÖ÷¼ü¡¢×ÔÈ»Ö÷¼ü¡¢¶¯Ì¬Ö÷¼ü¡¢AnyÀàÐÍ Creteria Queries Intercepter and Event ×Ô¶¨ÒåÀàÐ͵ȣ¬¿ÉÒÔÔÝʱÈÓÔÚÒ»±ß£© 91 9£ºSpring 92 IOC/DI 93 SpringÅäÖà 94 Spring¼Ü¹¹ 95 AOP¼°Spring AOP 96 ÉùÃ÷ʽÊÂÎñ£¨AOP£© 97 Spring + Hibernate SpringÖ§³ÖWeb 98 Scope 99 £¨ÆäËûµÄSpringÄ£¿é¶ÔÓÚ×ÔѧÀ´Ëµ¿ÉÒÔÔÝʱÈÓÔÚÒ»±ß£©100 10£ºEJB3.0101 J2EE¼Ü¹¹»ù´¡£¨JTA JMSµÈ£©102 EJB»ù´¡£¨µØλ¼°»ù±¾ÀíÂÛ¡¢·ÖÀàµÈ£©103 Annotation104 Ant±àÒëÓ벿ÊðEJB105 Session Bean106 EJBµÄÒÀÀµ×¢Èë107 Persistence API108 £¨¿ÉÒÔÓÃJBossѧϰEJB3.0£©109110 11:ÖÁÓÚSOA£¬¶ÔÓÚ×ÔѧµÄͬѧÀ´Ëµ£¬ÔÝʱ²»ÓÃÌرð¹Ø×¢
ÍƼö°ÑJ2SEѧͨÁË£¬Õâ¸öÊÇѧϰJ2ME¡¢J2EE£¬ÉõÖÁÊÇѧϰAndroidµÄ»ù´¡¡£
ÏÂÃæÊÇѧϰIOÕâÕÂʱдµÄÎļþ²Ù×÷À࣬Ö÷ÒªÒ²ÊDzο¼ÁËÍøÉϵÄ×ÊÔ´http://zgqhyh.javaeye.com/blog/91333£¬²©¿ÍÀïÏÈ´æ×ÅÒÔ±¸ºóÐè¡£
1 package com.yuchao.filecopy; 2 3 import java.io.*; 4 import java.util.StringTokenizer; 5 6 public class FileOperate { 7 private String message; 8 public FileOperate() { 9 } 10 11 /** 12 * ¶ÁÈ¡Îı¾ÎļþÄÚÈÝ 13 * @param filePathAndName ´øÓÐÍêÕû¾ø¶Ô·¾¶µÄÎļþÃû 14 * @param encoding Îı¾Îļþ´ò¿ªµÄ±àÂ뷽ʽ 15 * @return ·µ»ØÎı¾ÎļþµÄÄÚÈÝ 16 */ 17 public String readTxt(String filePathAndName,String encoding) throws IOException{ 18 encoding = encoding.trim(); 19 StringBuffer str = new StringBuffer(""); 20 String st = ""; 21 try{ 22 FileInputStream fs = new FileInputStream(filePathAndName); 23 InputStreamReader isr; 24 if(encoding.equals("")){ 25 isr = new InputStreamReader(fs); 26 }else{ 27 isr = new InputStreamReader(fs,encoding); 28 } 29 BufferedReader br = new BufferedReader(isr); 30 try{ 31 String data = ""; 32 while((data = br.readLine())!=null){ 33 str.append(data+" "); 34 } 35 }catch(Exception e){ 36 str.append(e.toString()); 37 } 38 st = str.toString(); 39 }catch(IOException es){ 40 st = ""; 41 } 42 return st; 43 } 44 45 /** 46 * н¨Ä¿Â¼ 47 * @param folderPath Ŀ¼ 48 * @return ·µ»ØĿ¼´´½¨ºóµÄ·¾¶ 49 */ 50 public String createFolder(String folderPath) { 51 String txt = folderPath; 52 try { 53 java.io.File myFilePath = new java.io.File(txt); 54 txt = folderPath; 55 if (!myFilePath.exists()) { 56 myFilePath.mkdir(); 57 } 58 } 59 catch (Exception e) { 60 message = "´´½¨Ä¿Â¼²Ù×÷³ö´í"; 61 } 62 return txt; 63 } 64 65 /** 66 * ¶à¼¶Ä¿Â¼´´½¨ 67 * @param folderPath ×¼±¸ÒªÔÚ±¾¼¶Ä¿Â¼Ï´´½¨ÐÂĿ¼µÄĿ¼·¾¶ ÀýÈç c:myf 68 * @param paths ÎÞÏÞ¼¶Ä¿Â¼²ÎÊý£¬¸÷¼¶Ä¿Â¼ÒÔµ¥ÊýÏßÇø·Ö ÀýÈç a|b|c 69 * @return ·µ»Ø´´½¨ÎļþºóµÄ·¾¶ ÀýÈç c:myfac 70 */ 71 public String createFolders(String folderPath, String paths){ 72 String txts = folderPath; 73 try{ 74 String txt; 75 txts = folderPath; 76 StringTokenizer st = new StringTokenizer(paths,"|"); 77 for(int i=0; st.hasMoreTokens(); i++){ 78 txt = st.nextToken().trim(); 79 if(txts.lastIndexOf("/")!=-1){ 80 txts = createFolder(txts+txt); 81 }else{ 82 txts = createFolder(txts+txt+"/"); 83 } 84 } 85 }catch(Exception e){ 86 message = "´´½¨Ä¿Â¼²Ù×÷³ö´í£¡"; 87 } 88 return txts; 89 } 90 91 92 /** 93 * н¨Îļþ 94 * @param filePathAndName Îı¾ÎļþÍêÕû¾ø¶Ô·¾¶¼°ÎļþÃû 95 * @param fileContent Îı¾ÎļþÄÚÈÝ 96 * @return 97 */ 98 public void createFile(String filePathAndName, String fileContent) { 99 100 try { 101 String filePath = filePathAndName; 102 filePath = filePath.toString(); 103 File myFilePath = new File(filePath); 104 if (!myFilePath.exists()) { 105 myFilePath.createNewFile(); 106 } 107 FileWriter resultFile = new FileWriter(myFilePath); 108 PrintWriter myFile = new PrintWriter(resultFile); 109 String strContent = fileContent; 110 myFile.println(strContent); 111 myFile.close(); 112 resultFile.close(); 113 } 114 catch (Exception e) { 115 message = "´´½¨Îļþ²Ù×÷³ö´í"; 116 } 117 } 118 119 120 /** 121 * ÓбàÂ뷽ʽµÄÎļþ´´½¨ 122 * @param filePathAndName Îı¾ÎļþÍêÕû¾ø¶Ô·¾¶¼°ÎļþÃû 123 * @param fileContent Îı¾ÎļþÄÚÈÝ 124 * @param encoding ±àÂ뷽ʽ ÀýÈç GBK »òÕß UTF-8 125 * @return 126 */ 127 public void createFile(String filePathAndName, String fileContent, String encoding) { 128 129 try { 130 String filePath = filePathAndName; 131 filePath = filePath.toString(); 132 File myFilePath = new File(filePath); 133 if (!myFilePath.exists()) { 134 myFilePath.createNewFile(); 135 } 136 PrintWriter myFile = new PrintWriter(myFilePath,encoding); 137 String strContent = fileContent; 138 myFile.println(strContent); 139 myFile.close(); 140 } 141 catch (Exception e) { 142 message = "´´½¨Îļþ²Ù×÷³ö´í"; 143 } 144 } 145 146 147 /** 148 * ɾ³ýÎļþ 149 * @param filePathAndName Îı¾ÎļþÍêÕû¾ø¶Ô·¾¶¼°ÎļþÃû 150 * @return Boolean ³É¹¦É¾³ý·µ»ØtrueÔâÓöÒì³£·µ»Øfalse 151 */ 152 public boolean delFile(String filePathAndName) { 153 boolean bea = false; 154 try { 155 String filePath = filePathAndName; 156 File myDelFile = new File(filePath); 157 if(myDelFile.exists()){ 158 myDelFile.delete(); 159 bea = true; 160 }else{ 161 bea = false; 162 message = (filePathAndName+"ɾ³ýÎļþ²Ù×÷³ö´í"); 163 } 164 } 165 catch (Exception e) { 166 message = e.toString(); 167 } 168 return bea; 169 } 170 171 172 173 /** 174 * ɾ³ýÎļþ¼Ð 175 * @param folderPath Îļþ¼ÐÍêÕû¾ø¶Ô·¾¶ 176 * @return 177 */ 178 public void delFolder(String folderPath) { 179 try { 180 delAllFile(folderPath); //ɾ³ýÍêÀïÃæËùÓÐÄÚÈÝ 181 String filePath = folderPath; 182 filePath = filePath.toString(); 183 java.io.File myFilePath = new java.io.File(filePath); 184 myFilePath.delete(); //ɾ³ý¿ÕÎļþ¼Ð 185 } 186 catch (Exception e) { 187 message = ("ɾ³ýÎļþ¼Ð²Ù×÷³ö´í"); 188 } 189 } 190 191 192 /** 193 * ɾ³ýÖ¸¶¨Îļþ¼ÐÏÂËùÓÐÎļþ 194 * @param path Îļþ¼ÐÍêÕû¾ø¶Ô·¾¶ 195 * @return 196 * @return 197 */ 198 public boolean delAllFile(String path) { 199 boolean bea = false; 200 File file = new File(path); 201 if (!file.exists()) { 202 return bea; 203 } 204 if (!file.isDirectory()) { 205 return bea; 206 } 207 String[] tempList = file.list(); 208 File temp = null; 209 for (int i = 0; i < tempList.length; i++) { 210 if (path.endsWith(File.separator)) { 211 temp = new File(path + tempList[i]); 212 }else{ 213 temp = new File(path + File.separator + tempList[i]); 214 } 215 if (temp.isFile()) { 216 temp.delete(); 217 } 218 if (temp.isDirectory()) { 219 delAllFile(path+"/"+ tempList[i]);//ÏÈɾ³ýÎļþ¼ÐÀïÃæµÄÎļþ 220 delFolder(path+"/"+ tempList[i]);//ÔÙɾ³ý¿ÕÎļþ¼Ð 221 bea = true; 222 } 223 } 224 return bea; 225 } 226 227 228 /** 229 * ¸´ÖƵ¥¸öÎļþ 230 * @param oldPathFile ×¼±¸¸´ÖƵÄÎļþÔ´ 231 * @param newPathFile ¿½±´µ½Ð¾ø¶Ô·¾¶´øÎļþÃû 232 * @return 233 */ 234 public void copyFile(String oldPathFile, String newPathFile) { 235 try { 236 int bytesum = 0; 237 int byteread = 0; 238 File oldfile = new File(oldPathFile); 239 if (oldfile.exists()) { //Îļþ´æÔÚʱ 240 InputStream inStream = new FileInputStream(oldPathFile); //¶ÁÈëÔÎļþ 241 FileOutputStream fs = new FileOutputStream(newPathFile); 242 byte[] buffer = new byte[1444]; 243 while((byteread = inStream.read(buffer)) != -1){ 244 bytesum += byteread; //×Ö½ÚÊý Îļþ´óС 245 System.out.println(bytesum); 246 fs.write(buffer, 0, byteread); 247 } 248 inStream.close(); 249 } 250 }catch (Exception e) { 251 message = ("¸´ÖƵ¥¸öÎļþ²Ù×÷³ö´í"); 252 } 253 } 254 255 256 /** 257 * ¸´ÖÆÕû¸öÎļþ¼ÐµÄÄÚÈÝ 258 * @param oldPath ×¼±¸¿½±´µÄĿ¼ 259 * @param newPath Ö¸¶¨¾ø¶Ô·¾¶µÄÐÂĿ¼ 260 * @return 261 */ 262 public void copyFolder(String oldPath, String newPath) { 263 try { 264 new File(newPath).mkdirs(); //Èç¹ûÎļþ¼Ð²»´æÔÚ Ôò½¨Á¢ÐÂÎļþ¼Ð 265 File a=new File(oldPath); 266 String[] file=a.list(); 267 File temp=null; 268 for (int i = 0; i < file.length; i++) { 269 if(oldPath.endsWith(File.separator)){ 270 temp=new File(oldPath+file[i]); 271 }else{ 272 temp=new File(oldPath+File.separator+file[i]); 273 } 274 if(temp.isFile()){ 275 FileInputStream input = new FileInputStream(temp); 276 FileOutputStream output = new FileOutputStream(newPath + "/" + 277 (temp.getName()).toString()); 278 byte[] b = new byte[1024 * 5]; 279 int len; 280 while ((len = input.read(b)) != -1) { 281 output.write(b, 0, len); 282 } 283 output.flush(); 284 output.close(); 285 input.close(); 286 } 287 if(temp.isDirectory()){//Èç¹ûÊÇ×ÓÎļþ¼Ð 288 copyFolder(oldPath+"/"+file[i],newPath+"/"+file[i]); 289 } 290 } 291 }catch (Exception e) { 292 message = "¸´ÖÆÕû¸öÎļþ¼ÐÄÚÈݲÙ×÷³ö´í"; 293 } 294 } 295 296 297 /** 298 * Òƶ¯Îļþ 299 * @param oldPath 300 * @param newPath 301 * @return 302 */ 303 public void moveFile(String oldPath, String newPath) { 304 copyFile(oldPath, newPath); 305 delFile(oldPath); 306 } 307 308 309 /** 310 * Òƶ¯Ä¿Â¼ 311 * @param oldPath 312 * @param newPath 313 * @return 314 */ 315 public void moveFolder(String oldPath, String newPath) { 316 copyFolder(oldPath, newPath); 317 delFolder(oldPath); 318 } 319 public String getMessage(){ 320 return this.message; 321 } 322 }
ÍƼöÐÅÏ¢
- ÔÝÎ޼Ǽ
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- java urlÖØд¼¼Êõ(UrlReWriter)
- [ת]JavaµÄÊý×飨Array£©¡¢Vector¡¢ArrayLis....
- jsp»·¾³ÏÂajaxÂÒÂëÎÊÌâµÄ½â¾ö
- JSP¼¼Êõ Ö¸Áî ÂÒÂëÎÊÌâ ÔËÐÐÔÀíºÍ¾Å´óÒþʽ¶ÔÏó web¿ª·¢µÄË....
- JAVA ˮӡ ͼƬ ÎÄ×Ö
- java¶þ½øÖÆ£¬ÔÂë¡¢·´Âë¡¢²¹Â롢λÔËËã
- Java WebÓ¦ÓÃÆô¶¯¼ä¸ôÖ´ÐеijÌÐò
- jspÉú³ÉxmlÎļþʾÀý
- javaÖÐÀà±äÁ¿¡¢Àà·½·¨¡¢ÊµÀý±äÁ¿¡¢ÊµÀý·½·¨
- JSPÒ³ÃæµÄÎåÖÖÌøת·½·¨
ÆÀÂÛ