dz̸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 li
Ïà¹ØÎĵµ£º
¡¡¡¡inkfish·Ò룬ÇëÎðÉÌÒµÐÔÖÊתÔØ£¬×ªÔØÇë×¢Ã÷À´Ô´£¨http://blog.csdn.net/inkfish
£©¡£±¾ÎÄÊÇÎÒѧϰJUELͬʱ£¬¶ÔÔÍøÕ¾½øÐеļòµ¥µÄ·Ò룬ÔÍøÕ¾µØÖ·£ºhttp://juel.sourceforge.net/guide/basic/factory.html
¡£ËµÊµ»°£¬Õâƪ·ÒëµÄµÄÈ·²»ÔõÑù¡£
±í´ïʽ¹¤³§£¨Expression Factory£©
¡¡¡¡Èç¹ûҪʹÓÃEL
£¬¾Í±ØÐëÒªÓÐÒ ......
TimerλÓÚjava.utilÏÂÃ棬һ°ã½ÐËûjava¼ÆʱÆ÷¡£
javaAPIµÄ½âÊÍÈçÏÂ:
Ò»ÖÖÏß³ÌÉèÊ©£¬ÓÃÓÚ°²ÅÅÒÔºóÔÚºǫ́Ïß³ÌÖÐÖ´ÐеÄÈÎÎñ¡£¿É°²ÅÅÈÎÎñÖ´ÐÐÒ»´Î£¬»òÕ߶¨ÆÚÖظ´Ö´ÐС£
ÏÈÀ´¿´¿´Ð§¹û£º
1.Éè¼Æ¼ÆʱÆ÷
import java.io.IOException;
import java.util.Calendar;
import java.util.Timer;
public class TimerTest {
......
ËùÓйؼü×Ö¶¼ÊÇСдµÄ ×ÖĸÏ»®ÏßÒ»¶¨ÔÚÇ°Ãæ¡£Êý×Ö¿ªÍ·µÄ±êʶ·ûÊÇ·Ç·¨µÄ¡£²»ÄÜÓпոñ¡£Ö®¼ä²»ÄÜÓÐÔËËã·û ±êʶ·û Çø·Ö´óСд
ÀýÈ磺abcºÍAbcÊÇÁ½¸ö²»Í¬µÄ±êʶ·û ±êʶ·û²»ÄÜÊǹؼü×Ö Èç¹û±êʶ·ûÓɶà¸öµ¥´Ê¹¹³É£¬ÄÇô´ÓµÚ¶þ¸öµ¥´Ê¿ªÊ¼£¬Ê××Öĸ´óд
ʾÀý£ºisText ¡¢ canRunTheCar µÈ ¾¡Á¿ÉÙÓôø$·ûºÅµÄ±êʶ· ......
1. socketͨÐÅ£ºÓпͻ§¶ËºÍ·þÎñ¶ËµÄsocket´úÂë¡£
2. ¶àỊ̈߳º¿Í»§¶ËºÍ·þÎñ¶Ë¸÷ÓÃÒ»Ï̷߳¢ËÍÐÅÏ¢£»·þÎñ¶ËÁíÓÐÒ»¼àÌýỊ̈߳¬ÓÃÓڰѳ¬Ê±µÄÐÅϢɾ³ý¡£
ÕâÀïÓ¦Óõ½ÁËͬ²½£¬Ê¹Á½¸öÏ߳̿ÉÒÔ²Ù×÷ͬһ¸ömap¡£
´úÂ룺£¨ÀàÈ«ÔÚͬһ¸ö°üÄÚ£©
server¶Ë£º
Java´úÂë < typ ......