javaºÍphpÎļþ¶Áд¶Ô±È¾ÙÀý¼°½â¾öÈÃÈËÍ·Í´µÄÂÒÂëÎÊÌâ
JAVAÎļþ¶Áд±ØÐëҪעÒâ±àÂëÎÊÌâ
javaµÄÎļþд
Ö±½ÓʹÓÃFileWriter¼´¿É£¬µÚ¶þ¸ö²ÎÊýΪ׷¼ÓдÈ룬ĬÈÏÊǸ²¸Çд¡£Ð´Íê±ØÐëclose²Å»á±£´æдºÃµÄÄÚÈÝ¡£
ĬÈÏÇé¿öÈç¹ûûÓлáн¨Ò»¸öÎļþ
FileWriter fw = null;
try {
fw = new FileWriter("/data/updatetime.dat", true); // true×·¼ÓдÈë
fw.append(message + "\n\r");
} catch (IOException e) {
e.printStackTrace();
} finally {
if (fw != null) {
try {
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
javaµÄÎļþ¶Á
FileReaderÖ±½Ó¶ÁÖÐÎÄ»áÓÐÂÒÂëÎÊÌâ
FileReader fr = new FileReader("/data/updatetime.dat");
char[] data = new char[1024];
int num = fr.read(data);
String result = new String(data, 0, num);
//ÕâÀï»á²úÉúÂÒÂëÎÊÌâ
ʹÓÃÊäÈëÁ÷ת×Ö·û¶ÁͬÑù»á²úÉúÂÒÂ루º¹£©£¬×Ðϸ·ÖÎöÔÒò£¬Èç¹ûÎļþ±£´æÊÇANSI±àÂëµÄ£¨FileWriterдÈëĬÈÏÊǴ˱àÂ룩£¬ÄÇôÕâÀï±ØÐëÊÇiso8859-1£¬²¢ÇÒÐèҪת»»¡£
String r = null;
try {
BufferedReader br;
br = new BufferedReader(new InputStreamReader(new FileInputStream("/data/updatetime.dat"), "iso8859-1"));
String line = null;
StringBuffer result = new StringBuffer();
while((line = br.readLine()) != null) {
result.append(line);
}
br.close();
r = result.toString();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(r);
//ÕâÀïͬÑù»áÓÐÂÒÂëÎÊÌâ
ÏÂÃæÊDz»»áÂÒÂëµÄµÄ·½Ê½
Èç¹ûÊý¾ÝÎļþΪANSI±àÂ루ĬÈÏ£©
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("/data/updatetime.dat"), "iso8859-1"));
String line = null;
StringBuffer result = new StringBuffer();
while((line = br.readLine()) != null) {
result.append(line + "<br />");
}
br.close();
String r = new String(result.toString().getBytes("iso8859-1"), "utf-8");
System.out.println(r);
Èç¹ûÊý¾ÝÎļþΪUTF-8±àÂë
Bu
Ïà¹ØÎĵµ£º
»ù±¾¸ÅÄ
PermGen space£ºÈ«³ÆÊÇPermanent Generation space¡£¾ÍÊÇ˵ÊÇÓÀ¾Ã±£´æµÄÇøÓò,ÓÃÓÚ´æ·ÅClassºÍMetaÐÅÏ¢,ClassÔÚ±»LoadµÄʱºò±»·ÅÈë¸ÃÇøÓò
Heap space£º´æ·ÅInstance¡£ GC(Garbage Collection)Ó¦¸Ã²»»á¶ÔPermGen space½øÐÐÇåÀí
ËùÒÔÈç¹ûÄãµÄAPP»áLOADºÜ¶àCLASSµÄ»°,¾ÍºÜ¿ÉÄܳöÏÖPermGen space´íÎó
Java Hea ......
http://school.itzcn.com/special-spid-50.html
Òì³£¸úÆÕͨµÄ¾¯¸æµÈÓÐÒ»¶¨µÄÇø±ð¡£µ±Ó¦ÓóÌÐò·¢ÉúÒ쳣ʱ£¬»áÖжÏÕýÔÚÖ´ÐеijÌÐòµÄÕý³£Ö¸ÁîÁ÷¡£Ò²¾ÍÊÇ˵£¬·¢ÉúÒì³£ºóÃæµÄ´úÂ뽫µÃ²»µ½ÕýÈ·µÄÖ´ÐС£ÉõÖÁ»¹»á´¥·¢Êý¾Ý¿âµÄ»ØÍ˲Ù×÷¡£
¡¡¡¡ÔÚJava¿ª·¢Æ½Ì¨ÖУ¬Òì³£°üÀ¨Ô¤¶¨ÒåÒì³£Óë×Ô¶¨ÒåÒì³£¡£ÕâÁ½ÖÖÒì³£µÄÀàÐÍ»¥Îª²¹³ä¡£×÷Ϊһ ......
Java
ƽ̨ÒÑÎÞ´¦²»ÔÚ£¬Java EE¡¢Java SE¡¢Java ME ºÍ Java Card£¬Java
µÄ·¢Õ¹ÎªÎÞÊý³ÌÐòÔ±ÌṩÁ˹¤×÷»ú»á£¬¶¼ÊÇ“Java”£¬È»¶ø³ýÁË»ù±¾µÄ Java
Óï·¨´ó¶¼Ò»ÖÂÍ⣬³ÌÐòÔ±±ØÐë»ùÓÚ²»Í¬µÄƽ̨Óв»Í¬µÄ¿¼ÂÇ£¬Ñ§Ï°²»Í¬Æ½Ì¨µÄÌص㣺
²»Í¬Æ½Ì¨µÄ»·¾³
Java EE ËùÔËÐеÄÓ²¼þ·þÎñÆ÷¡¢²Ù×÷ϵͳ£¬Java SE ËùÔÚ PC »ú ......
jspx Ò»¸öÀ´×ÔÓÚ°£¼°µÄjava web¿ìËÙ¿ª·¢¿ò¼Ü
À´Ô´£ºhttp://www.javaeye.com/news/4887
Ã÷£ºJavaEyeÐÂÎÅÎÄÕµİæȨÊôÓÚJavaEyeÍøÕ¾ËùÓУ¬ÑϽûÈκÎÍøվתÔر¾ÎÄ£¬·ñÔò±Ø½«×·¾¿·¨ÂÉÔðÈΣ¡
ÔõôÓÖð³öÒ»¸öweb¿ò¼Ü?
¿´¿´ÏÖ´æµÄJava webÓ¦ÓóÌÐò¿ò¼Ü£¬ÎÞÒ»ÀýÍâµÄÒªÇ󻨷ѴóÁ¿µÄʱ¼äÓ뾫Á¦ºó²Å¿ÉͶÈëÉ ......