Java¶ÁÎļþдÎļþ²Ù×÷
ÕâÀJavaµÄ¶ÁÎļþºÍдÎļþ¶¼ÊÇ»ùÓÚ×Ö·ûÁ÷µÄ£¬Ö÷ÒªÓõ½ÏÂÃæµÄ¼¸¸öÀࣺ
1¡¢FileReader----¶ÁÈ¡×Ö·ûÁ÷
2¡¢FileWriter----дÈë×Ö·ûÁ÷
3¡¢BufferedReader----»º³åÖ¸¶¨ÎļþµÄÊäÈë
¸ÃÀàµÄ·½·¨ÓУº
void close()
¹Ø±Õ¸ÃÁ÷¡£
void mark(int readAheadLimit)
±ê¼ÇÁ÷Öеĵ±Ç°Î»Öá£
boolean markSupported()
ÅжϴËÁ÷ÊÇ·ñÖ§³Ö mark() ²Ù×÷£¨ËüÒ»¶¨Ö§³Ö£©
int read()
¶ÁÈ¡µ¥¸ö×Ö·û¡£
int read(char[] cbuf, int off, int len)
½«×Ö·û¶ÁÈëÊý×éµÄijһ²¿·Ö¡£
String readLine()
¶ÁÈ¡Ò»¸öÎı¾ÐС£
boolean ready()
ÅжϴËÁ÷ÊÇ·ñÒÑ×¼±¸ºÃ±»¶ÁÈ¡¡£
void reset()
½«Á÷ÖØÖÃΪ×îеıê¼Ç¡£
long skip(long n)
Ìø¹ý×Ö·û¡£
4¡¢BufferedWriter----½«»º³å¶ÔÎļþµÄÊä³ö
¸ÃÀàµÄ·½·¨ÓУº
void close()
¹Ø±Õ¸ÃÁ÷¡£
void flush()
ˢиÃÁ÷µÄ»º³å¡£
void newLine()
дÈëÒ»¸öÐзָô·û¡£
void write(char[] cbuf, int off, int len)
дÈë×Ö·ûÊý×éµÄijһ²¿·Ö¡£
void write(int c)
дÈëµ¥¸ö×Ö·û¡£
void write(String s, int off, int len)
дÈë×Ö·û´®µÄijһ²¿·Ö¡£
¾Ù¸öÀý×ÓÈçÏ£º
package aillo;
import java.io.*;
public class FileWriterReader {
//¹¦ÄÜ:¶ÁÈ¡f:/aillo.txtÎļþµÄÄÚÈÝ(Ò»ÐÐÒ»ÐжÁ),²¢½«ÆäÄÚÈÝдÈëf:/jackie.txtÖÐ
//֪ʶµã:java¶ÁÎļþ¡¢Ð´Îļþ---<ÒÔ×Ö·ûÁ
Ïà¹ØÎĵµ£º
µÚÒ»½Ú Êý¾ÝÁ÷µÄ»ù±¾¸ÅÄî
Àí½âÊý¾ÝÁ÷
Á÷Ò»°ã·ÖΪÊäÈëÁ÷£¨Input Stream£©ºÍÊä³öÁ÷£¨Output Stream£©Á½À࣬µ«ÕâÖÖ»®·Ö²¢²»ÊǾø¶ÔµÄ¡£±ÈÈçÒ»¸öÎļþ£¬µ±ÏòÆäÖÐдÊý¾Ýʱ£¬Ëü¾ÍÊÇÒ»¸öÊä³öÁ÷£»µ±´ÓÆäÖжÁÈ¡Êý¾Ýʱ£¬Ëü¾ÍÊÇÒ»¸öÊäÈëÁ÷¡£µ±È»£¬¼üÅÌÖ»ÊÇÒ»¸öÊýÈËÁ÷£¬¶øÆÁÄ»ÔòÖ»ÊÇÒ»¸öÊä³öÁ÷¡ ......
תÌù×Ô http://www.3800hk.com/Article/cxsj/java/jcjcjave/2009-11-10/Article_181759.html
¡¡1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾Ý
µÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯
ÖÎÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
¡¡¡¡
¡¡¡¡2. Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓÚÖ±½ÓλÓÚCPUÖеļĴæÆ÷¡£µ«È±µãÊÇ£¬ ......
Ò» Ï̵߳Ļù±¾¸ÅÄî
Ïß³ÌÊÇÒ»¸ö³ÌÐòÄÚ²¿µÄ˳Ðò¿ØÖÆÁ÷.Ò»¸ö½ø³ÌÏ൱ÓÚÒ»¸öÈÎÎñ,Ò»¸öÏß³ÌÏ൱ÓÚÒ»¸öÈÎÎñÖеÄÒ»ÌõÖ´Ðз¾¶.£»¶à½ø³Ì:ÔÚ²Ù×÷ϵͳÖÐÄÜͬʱÔËÐжà¸öÈÎÎñ (³ÌÐò)£»¶àÏß³Ì:ÔÚͬһ¸öÓ¦ÓóÌÐòÖÐÓжà¸ö˳ÐòÁ÷ͬʱִÐУ»JavaµÄÏß³ÌÊÇͨ¹ýjava.lang.ThreadÀàÀ´ÊµÏֵģ»JVMÆô¶¯Ê±»áÓÐÒ»¸öÓÉÖ÷·½·¨(public static voi ......
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import sun.net.TelnetOutputStream;
import sun.net.TelnetInputStream;
import sun.net.ftp.FtpClient;
public class download ...{
& ......
1¡¢ÀàÐÍÄ£°å Class£º
ÎïÒÔÀà¾Û£º
ÎÒÃÇ¿ÉÒÔÓÃclass Person{ } class Animal{ }À´ÃèÊöÒ»ÀàÈË»òÒ»ÀදÎ
ÄÇôÔÙÏëһϣ¬ÎÒÃÇÊDz»ÊÇ¿ÉÒÔÓÃclass Class{ } À´³éÏóÃèÊöÀàÄØ£¿
´ð°¸Ê±¿ÉÒԵģ¬Õâ¾ÍÊÇjdkÖÐµÄ Class ÀࣨÀàÐ ......