Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVA×Ö·ûÁ÷ÎÊÌâ

×Ö·ûÁ÷µÄ¶ÁºÍд×îÖÕÔڵײ㶼ÊÇͨ¹ý×Ö½ÚÁ÷À´Íê³ÉµÄÂ𣿡¡¶ÁдÎı¾Îļþ×Ö·ûÁ÷Ó¦¸Ã¾Í¿ÉÒÔÁË°É¡£¡£
¸÷λ´ó¸ç´ó½ã°ï°ïæ°¢

JavaÁ÷°üÀ¨×Ö½ÚÁ÷ºÍ×Ö·ûÁ÷£¬×Ö½ÚÁ÷ͨ¹ýIOÉ豸ÒÔ×Ö½ÚÊý¾ÝµÄ·½Ê½¶ÁÈ룬¶ø×Ö·ûÁ÷ÔòÊÇͨ¹ý×Ö½ÚÁ÷¶ÁÈëÊý¾Ýת»¯³É×Ö·û¡°Á÷¡±µÄÐÎʽÓÉÓû§Çýʹ¡£  
Á÷¿ÉÒÔͨ¹ý°ü×°½øÐй¦ÄÜÉϵÄÀ©³ä£¬±ÈÈç˵BufferedStream£¬¿ÉÒÔ»º³åÁ÷£¬Ìá¸ß¶ÁÈ¡µÄÐÔÄÜ

¶ÁдÎı¾Îļþ×Ö·ûÁ÷¿ÉÒÔ
¿ÉÒÔʹÓÃBufferedInputStream 


ÎÒÖªµÀ¶ÁÎļþ¿ÉÒÔÓÃ×Ö·ûÁ÷¡£µ«ÊÇÏñInputStreamReader(InputStream in) ÀïÃæµÄ²ÎÊýÓиö×Ö½ÚÁ÷¡£¡£FileReade£òÒ²ÊǼ̳ÐËû¡£ËùÒÔÎÒ¾õµÃÊDz»ÊǵײãÉÏÆäʵ×Ö·ûÁ÷µÄÊäÈëÊä³ö¶¼ÊÇ×Ö½ÚÁ÷Íê³ÉµÄ¡¡¶¼Àë²»¿ª×Ö½ÚÁ÷


Æäʵ×Ö·ûÁ÷ûÓÐʵ¼ÊµÄÐÎʽ£¬Ö»ÄÜÊÇͨ¹ý°üװһЩÌرðµÄÊäÈëÁ÷²ÅÄܽøÐÐ×Ö·û²Ù×÷£¬±ÈÈç˵°ü×°×Ö½ÚÁ÷InputStream£º
Reader reader = new InputStreamReader(System.in);
ÔÙ±ÈÈç˵°ü×°×Ö·ûÊý×飺
char[] in = new char[1024];
Reader reader = new CharArrayReader(in);

ËäÈ»²»ÊÇÎÒÏëÖªµÀµÄ¡£¡£»¹ÊÇллÁË

ÒýÓÃ
ÎÒÖªµÀ¶ÁÎļþ¿ÉÒÔÓÃ×Ö·ûÁ÷¡£µ«ÊÇÏñInputStreamReader(InputStream in) ÀïÃæµÄ²ÎÊýÓиö×Ö½ÚÁ÷¡£¡£FileReade£òÒ²ÊǼ̳ÐËû¡£ËùÒÔÎÒ¾õµÃÊDz»ÊǵײãÉÏÆäʵ×Ö·ûÁ÷µÄÊäÈëÊä³ö¶¼ÊÇ×Ö½ÚÁ÷Íê³ÉµÄ¡¡¶¼Àë²»¿ª×Ö½ÚÁ÷



ÎÒ¾õµÃÄã˵µÄÊÇÕýÈ·µÄ¡£io°üµÄÆäËûµÄÀà»ù±¾¶¼¼Ì³Ð×Ôinput/outputstream»òÕß²ÉÓÃÁËÆäËûµÄÒÀÀµ¡£

û´í£¬ËùÓеÄÎļþ¶Áд¶¼ÊǶÔ×ֽڵIJÙ×÷£¬
¶Á×Ö·ûÁ÷Ò²ÊÇÏȶÁµÄ×Ö½ÚÁ÷£¬È»ºó°´Ä³ÖÖ±àÂëÐÎʽת»¯³É×Ö·û£¨n¸ö×Ö½Ú±íʾһ¸ö×Ö·û£©£¬

¶÷¡£¡£Á˽âÁË

InputStreamReader ÊÇÌØÊâµÄ


Ïà¹ØÎÊ´ð£º

javaÈçºÎ¿ØÖÆÔ¶³ÌLinuxÖØÆô

ÎÒÄ¿Ç°ÔÚ±¾µØµÄlinuxÉÏдÁËÒ»¸öswingµÄ½çÃ棬Ïëͨ¹ýÕâ¸ö½çÃæÀ´¿ØÖÆÆäËüµçÄÔµÄlinuxÖØÆô¡£
ÎÒÖªµÀÓÃRuntime.getRuntime().exec("shutdown -r");¿ÉÒÔ¿ØÖƱ¾»úLinuxÖØÆô£¬µ«ÊÇÔõô¿ØÖÆÔ¶³ÌµÄlinuxÖØÆôÄØ£¿ ......

java appletÔõôµ÷ÓÃjsp

ÎÒÏëд¸öÑéÖ¤³ÌÐò(JAVA)£¬¿Í»§¶ËÊäÈëÓû§ÃûºÍÃÜÂ룬·ÃÎÊÍøÂç·þÎñÆ÷µÄJSP³ÌÐò£¬JSP½øÐÐÑéÖ¤£¬°ÑÑéÖ¤½á¹û·´À¡¸ø¿Í»§¶Ë£¬ÏÖÔÚÎÊÌâÊÇ
1£¬JSPÔõôÑùÉ趨·µ»ØÖµ£¬ÊÇÓÃresponseô£¿
2£¬¿Í»§¶ËÔõô½ÓÊÜ·´À¡»ØÀ´µÄ´¦Àí½ ......

java×Ö·û´®ºÍjspÒ³Ãæת»»

ÓиöjavaµÄ×Ö·û´®str£¬¸ñʽ´ó¸ÅÊÇÕâÑù str="1.****** \n  2.****************\n";
ÔÚ³ÌÐòÖдòÓ¡Õâ¸ö×Ö·û´®Ã»ÓÐÎÊÌ⣬ÄÜÕýÈ·»»ÐУ¬¿ÉÊÇͨ¹ý¶ÔÏ󴫵ݵ½jspÒ³Ã棬ʹÓÃel±í´ïʽµÄ·½Ê½È´²»ÄÜ»»ÐÐÁË£¬Ç ......

jspµÄjava´úÂë±ê×¼Êä³ö±»Ð´µ½ÁËÄÄÀï?

ÔÚsolarisÉÏÔËÐÐtomcat,ÎÒÔÚjspÒ³ÃæÀïÃæµÄjava´úÂëÀïÃæдÁËSystem.out.println£¬Õâ¸ö±ê×¼Êä³ö±»¶¨Ïòµ½ÄÄÀïÈ¥ÁË£¬ÎÒÈçºÎ²é¿´ÄØ?

лл!!!!!
ºÍÔÚÖ±½ÓÔÚjavaÖÐдSystem.out.printlnµÄÊä³öÊÇͬһ¸öµØ·½.Ó¦¸ÃÔÚ±ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ