JAVA ÊäÈëÊä³öÁ÷
¡¡JavaÓïÑÔµÄÊäÈëÊä³ö¹¦ÄÜÊÇÊ®·ÖÇ¿´ó¶øÁé»îµÄ£¬ÃÀÖв»×ãµÄÊÇ¿´ÉÏÈ¥ÊäÈëÊä³öµÄ´úÂë²¢²»ÊǺܼò½à£¬ÒòΪÄãÍùÍùÐèÒª°ü×°Ðí¶à²»Í¬µÄ¶ÔÏó¡£ÔÚJavaÀà¿âÖУ¬IO²¿·ÖµÄÄÚÈÝÊǺÜÅÓ´óµÄ£¬ÒòΪËüÉæ¼°µÄÁìÓòºÜ¹ã·º:±ê×¼ÊäÈëÊä³ö£¬ÎļþµÄ²Ù×÷£¬ÍøÂçÉϵÄÊý¾ÝÁ÷£¬×Ö·û´®Á÷£¬¶ÔÏóÁ÷£¬zipÎļþÁ÷....±¾ÎĵÄÄ¿µÄÊÇΪ´ó¼Ò×öÒ»¸ö¼òÒªµÄ½éÉÜ¡£
¡¡¡¡Á÷ÊÇÒ»¸öºÜÐÎÏóµÄ¸ÅÄµ±³ÌÐòÐèÒª¶ÁÈ¡Êý¾ÝµÄʱºò£¬¾Í»á¿ªÆôÒ»¸öͨÏòÊý¾ÝÔ´µÄÁ÷£¬Õâ¸öÊý¾ÝÔ´¿ÉÒÔÊÇÎļþ£¬Äڴ棬»òÊÇÍøÂçÁ¬½Ó¡£ÀàËƵģ¬µ±³ÌÐòÐèҪдÈëÊý¾ÝµÄʱºò£¬¾Í»á¿ªÆôÒ»¸öͨÏòÄ¿µÄµØµÄÁ÷¡£ÕâʱºòÄã¾Í¿ÉÒÔÏëÏóÊý¾ÝºÃÏñÔÚÕâÆäÖГÁ÷”¶¯Ò»Ñù£¬ÈçÏÂͼ£º
¡¡¡¡JavaÖеÄÁ÷·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇ×Ö½ÚÁ÷£¬ÁíÒ»ÖÖÊÇ×Ö·ûÁ÷£¬·Ö±ðÓÉËĸö³éÏóÀàÀ´±íʾ£¨Ã¿ÖÖÁ÷°üÀ¨ÊäÈëºÍÊä³öÁ½ÖÖËùÒÔÒ»¹²Ëĸö£©:InputStream£¬OutputStream£¬Reader£¬Writer¡£JavaÖÐÆäËû¶àÖÖ¶àÑù±ä»¯µÄÁ÷¾ùÊÇÓÉËüÃÇÅÉÉú³öÀ´µÄ:
¡¡¡¡ÔÚÕâÆäÖÐInputStreamºÍOutputStreamÔÚÔçÆÚµÄJava°æ±¾ÖоÍÒѾ´æÔÚÁË£¬ËüÃÇÊÇ»ùÓÚ×Ö½ÚÁ÷µÄ£¬¶ø»ùÓÚ×Ö·ûÁ÷µÄReaderºÍWriterÊǺóÀ´¼ÓÈë×÷Ϊ²¹³äµÄ¡£ÒÔÉϵIJã´ÎͼÊÇJavaÀà¿âÖеÄÒ»¸ö»ù±¾µÄ²ã´ÎÌåϵ¡£
¡¡¡¡ÔÚÕâËĸö³éÏóÀàÖУ¬InputStreamºÍReader¶¨ÒåÁËÍêÈ«ÏàͬµÄ½Ó¿Ú£º
int read£¨£©
int read£¨char cbuf[]£©
int read£¨char cbuf[], int offset, int length£©
¡¡¡¡¶øOutputStreamºÍWriterÒ²ÊÇÈç´Ë£º
int write£¨int c£©
int write£¨char cbuf[]£©
int write£¨char cbuf[], int offset, int length£©
¡¡¡¡ÕâÁù¸ö·½·¨¶¼ÊÇ×î»ù±¾µÄ£¬read£¨£©ºÍwrite£¨£©Í¨¹ý·½·¨µÄÖØÔØÀ´¶Áдһ¸ö×Ö½Ú£¬»òÕßÒ»¸ö×Ö½ÚÊý×é¡£
¡¡¡¡¸ü¶àÁé»î¶à±äµÄ¹¦ÄÜÊÇÓÉËüÃǵÄ×ÓÀàÀ´À©³äÍê³ÉµÄ¡£ÖªµÀÁËJavaÊäÈëÊä³öµÄ»ù±¾²ã´Î½á¹¹ÒԺ󣬱¾ÎÄÔÚÕâÀïÏë¸ø´ó¼ÒһЩÒÔºó¿ÉÒÔ·´¸´Ó¦ÓÃÀý×Ó£¬¶ÔÓÚËùÓÐ×ÓÀàµÄϸ½Ú¼°Æ书Äܲ¢²»ÏêϸÌÖÂÛ¡£
import java.io.*£»
public class IOStreamDemo {
public void samples£¨£© throws IOException {
//1. ÕâÊÇ´Ó¼üÅ̶ÁÈëÒ»ÐÐÊý¾Ý,·µ»ØµÄÊÇÒ»¸ö×Ö·û´®
BufferedReader stdin =new BufferedReader£¨new InputStreamReader£¨System.in£©£©£»
System.out.print£¨"Enter a line:"£©£»
Ïà¹ØÎĵµ£º
Ê×ÏÈÃ÷ȷһϣºjavaÀïÃæÖ»ÓÐÖµ´«µÝ£¬ÒýÓô«µÝÖ»ÊÇÒ»Ö»Îó¶Á¶øÒÑ¡£
À´¿´Ò»¸öÀý×Ó£º
public static void main(String[] args)
{
StringBuffer str1 = new StringBuffer("hello");
test(str1);
System.out.println("main : " + str1);
}
public static void test(StringBuffer s ......
1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£ ......
MineHeÔ´´
¿´ÁËһ϶ÔJava GUIÌÖÂÛµÄÌû×Ó£¬ËùÒÔдÁËһƪÎÄÕÂÀ´²ûÊöһϸ÷ÖÖGUI¼¼ÊõµÄÓÅÁÓ¡£
JavaÊÀ½çÖУ¬Ä¿Ç°×îÖªÃûµÄÈý´óGUI¿â·Ö±ðÊÇ£º
1¡¢AWT£¨Abstract Window Toolkit£©³éÏó´°¿Ú¹¤¾ß°ü¿â£¬°üº¬ÓÚËùÓеÄJava SDKÖÐ
2¡¢Swing¸ß¼¶Í¼Ðο⣬°üº¬ÓÚJava2 SDKÖÐ
3¡¢À´×ÔIBM Eclipse¿ªÔ´ÏîÄ¿µÄSWT£¨Standard Widget Toolk ......