JavaÁ÷
//Îå¸öÀà
--|fileÀֱࣺ½ÓÓëÎļþ±¾ÉíÓйØϵ
--|×Ö½ÚÁ÷ OutputStream InputStream
--|×Ö·ûÁ÷ Writer Reader
´æ·ÅÔÚÎļþÖеĶ¼ÊÇ×Ö½Ú¡£¶ø¶Áµ½ÄÚ´æÖвſÉÄܱä³É×Ö·û
´òÓ¡Á÷£ºprintStream/PrintWriter:ÌṩÁ˸÷ÖÖ´òÓ¡¹¦ÄÜ£¬¿ÉÒÔÊä³öÈÎÒâµÄÄÚÈÝ£¬¸ù¾ÝʵÀý»¯¶ÔÏóµÄ²»Í¬
Êä³öµÄλÖÃÒ²²»Í¬
package java11.IO;
import java.io.*;
public class FileTest
{
public static void main(String args[]){
makeDir("D:\\ACM");
}
//ÔËÓõݹé²Ù×÷´òÓ¡ËùÓеÄĿ¼
public static void makeDir(String dir){
try{
File f = new File(dir);
String str[] = null;
if(f.isDirectory()){
str = f.list();
for(int i =0;i<str.length ; i++){
//separatorChar=="\\"
//makeDir(dir+"\\"+str[i]);
makeDir(dir+f.separatorChar+str[i]);
}
}else{
System.out.println(dir);
}
}catch(Exception e){
}
}
}
package java11.IO;
import java.io.*;
public class OutputStreamTest
{
//OutputStream||InputStream¶¼ÊDzÙ×÷×Ö½ÚҪͨ¹ýbyte½øÐÐת»»
//Èç¹ûÍü¼Ç¹Ø±ÕÁË¡£ÔòÊÇÒ»Ñù¿ÉÒÔдÈëÊý¾ÝµÄ¡£
//µ«ÊÇ×Ö·ûÁ÷²»¹Ø±Õ£¬ÄÚ´æÖеÄÊý¾Ý²»»áÇ¿ÖƵÄÊäÈëµ½Îļþ£¬×Ö·ûÁ÷
//ÖÐʹÓÃÁË»º´æ£¬ÔڹرÕʱ»áÇ¿ÖÆÐÔÇå¿Õ»º´æ£¬¿ÉÒÔͨ¹ýflush·½·¨
//½øÐÐÊÖ¹¤Çå¿Õ¡£
//Á½ÕßÖ®¼ä×î´óµÄÇø±ðÔÚÓÚ£¬×Ö·ûÁ÷ʹÓÃÁË»º´æ£¬¶ø×Ö½ÚÁ÷ÔòûÓÐÓõ½
public static void main(String args []){
//writeOutputStream();
//readInputStream();
//outputWriter();
inputRead();
}
public static void writeOutputStream(){
//Òª²Ù×÷µÄÎļþ
File f = new File("D:\\outputStram.txt");
OutputStream out = null;
//ͨ¹ý×ÓÀàFileOutputStream½øÐÐʵÀý»¯
try{
out = new FileOutputStream(f);
}catch(Exception e){
}
//½«×Ö·û´®×ª»¯ÎªbyteÊý×é
String name = "hao 123..";
byte [] b = name.getBytes();
try{
out.write(b);
}catch(Exception e){
}
try{
//¹Ø±Õ
out.close();
}catch(Exception e){
}
}
public static void outputWriter(){
//Òª²Ù×÷µÄÎļþ
File f = new File("D:\\outputStram.txt");
Writer out = null;
//ͨ¹ý×ÓÀàFileOutputStream½øÐÐʵ
Ïà¹ØÎĵµ£º
Ò»¡¢Àà×°ÔØÆ÷£ºÍ¨¹ý·Ö±ðʹÓò»Í¬µÄÀà×°ÔØÆ÷×°ÔØ¿É¿¿µÄ°üºÍ²»¿É¿¿µÄ°üÀ´ÊµÏÖ°² È«ÐÔ¡£
ÔÚ1.2°æ±¾µÄJavaÐéÄâ»ú¿ªÊ¼ÔËÐÐʱ£¬ÔÚÓ¦ÓóÌÐòÆô¶¯ÒÔÇ°£¬ËüÖÁÉÙ´´½¨Ò»¸öÓû§×Ô¶¨ÒåÀà×°ÔØÆ÷£¬Ò²¿ÉÄÜÊǶà¸ö¡£ËùÓÐÕâЩÀà×°ÔØÆ÷±»Á¬½ÓÔÚÒ»¸öË«Ç×--º¢×ӵĹØϵÁ´ÖУ¬ÔÚÕâÌõÁ´µÄ¶¥¶ËÊÇÆô¶¯Àà×°ÔØÆ÷£¬Ä©¶ËÊÇÒ»¸ö±»³ÆΪ“ϵͳÀà× ......
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ¾ ......
ÈçºÎ»ñÈ¡LCDSÇëÇó¹ý³ÌÖÐJAVAÅ׳öÀ´µÄExceptionÄØ£¿ µ±flexͨ¹ýÇëÇó¶ÔÏóÇëÇó·þÎñ¶ËµÄʱºò£¬ÇëÇó³É¹¦»á·¢mx.rpc.events.ResultEventʼþ£¬Óöµ½·þÎñ¶ËÒì³£»òÆäËû·Ç200µÄHTTP״̬Â루ÀýÈç404£¬403£©Ôò»á·¢mx.rpc.events.FaultEventʼþ£¬µ«ÇëÇóʧ°ÜÊÇÒòΪʲôÔÒòÄØ£¿ÒòΪ²»Í¬µÄÔÒò¿ÉÄܵ¼Ö½çÃæÉϲ»Í ......
Java¶ÔÏó¼°ÒýÓÃ
Java¶ÔÏó¼°ÒýÓÃÊÇÈÝÒ×»ìÏýÈ´ÓÖ±ØÐëÕÆÎյĻù´¡ÖªÊ¶£¬±¾Õ²ûÊöJava¶ÔÏóºÍÒýÓõĸÅÄÒÔ¼°ÓëÆäÃÜÇÐÏà¹ØµÄ²ÎÊý´«µÝ¡£
ÏÈ¿´ÏÂÃæµÄ³ÌÐò£º
StringBuffer s;
s = new StringBuffer("Hello World!");
µÚÒ»¸ö ......