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

dz̸javaÊäÈëÊä³öÁ÷

±¾ÎÄת×Ô£ºhttp://cyp-034.blog.163.com/blog/static/2823190520074691849380/
stream
´ú±íµÄÊÇÈκÎÓÐÄÜÁ¦²ú³öÊý¾ÝµÄÊý¾ÝÔ´£¬»òÊÇÈκÎÓÐÄÜÁ¦½ÓÊÕÊý¾ÝµÄ½ÓÊÕÔ´¡£ÔÚJavaµÄIOÖУ¬ËùÓеÄstream£¨°üÀ¨InputstreamºÍ
Out stream£©¶¼°üÀ¨Á½ÖÖÀàÐÍ£º
(1)×Ö½ÚÁ÷
 
±íʾÒÔ×Ö½ÚΪµ¥Î»´ÓstreamÖжÁÈ¡»òÍùstreamÖÐдÈëÐÅÏ¢£¬¼´io°üÖеÄinputstreamÀàºÍoutputstreamÀàµÄÅÉÉúÀࡣͨ³£ÓÃ
À´¶ÁÈ¡¶þ½øÖÆÊý¾Ý£¬ÈçͼÏóºÍÉùÒô¡£
£¨2£©×Ö·ûÁ÷
ÒÔUnicode×Ö·ûΪµ¼ÏòµÄstream£¬±íʾÒÔUnicode×Ö·ûΪµ¥Î»´Óstream
ÖжÁÈ¡»òÍùstreamÖÐдÈëÐÅÏ¢¡£
Çø±ð£º
ReaderºÍWriterÒª½â¾öµÄ£¬×îÖ÷ÒªµÄÎÊÌâ¾ÍÊǹú¼Ê»¯¡£Ô­ÏȵÄI/OÀà¿âÖ»Ö§³Ö8λ
µÄ×Ö½ÚÁ÷£¬Òò´Ë²»¿ÉÄܺܺõش¦Àí16λµÄUnicode×Ö·ûÁ÷¡£UnicodeÊǹú¼Ê»¯µÄ×Ö·û¼¯(¸üºÎ¿öJavaÄÚÖõÄchar¾ÍÊÇ16λµÄ
Unicode×Ö·û)£¬ÕâÑù¼ÓÁËReaderºÍWriterÖ®ºó£¬ËùÓеÄI/O¾Í¶¼Ö§³ÖUnicodeÁË¡£´ËÍâÐÂÀà¿âµÄÐÔÄÜÒ²±È¾ÉµÄºÃ¡£
µ«ÊÇ£¬ReadºÍWrite²¢²»ÊÇÈ¡´úInputStreamºÍOutputStream£¬
ÓÐʱ£¬Ä㻹±ØÐëͬʱʹÓÃ"»ùÓÚbyteµÄÀà"ºÍ"»ùÓÚ×Ö·ûµÄÀà"¡£Îª´Ë£¬Ëü»¹ÌṩÁËÁ½¸ö"ÊÊÅäÆ÷(adapter)"Àà¡£
InputStreamReader¸ºÔð½«InputStreamת»¯³ÉReader£¬¶øOutputStreamWriterÔò½«
OutputStreamת»¯³ÉWriter¡£
Ò»£®Á÷µÄ²ã´Î½á¹¹
¶¨Ò壺
£¨1£©      
java½«¶ÁÈ¡Êý¾Ý¶ÔÏó³ÉΪÊäÈëÁ÷£¬ÄÜÏòÆäдÈëµÄ¶ÔÏó½ÐÊä³öÁ÷¡£½á¹¹Í¼ÈçÏ£ºÊäÈëÁ÷£º
Êä³öÁ÷
¶þ£®InputStreamÀà
inputstreamÀàºÍoutputstreamÀ඼Ϊ³éÏóÀ࣬²»ÄÜ´´½¨¶ÔÏ󣬿ÉÒÔͨ¹ý
×ÓÀàÀ´ÊµÀý»¯¡£
InputStreamÊÇÊäÈë×Ö½ÚÊý¾ÝÓõÄÀ࣬ËùÒÔInputStreamÀàÌṩÁË3ÖÖÖØÔØ
µÄread·½·¨.InputstreamÀàÖеij£Ó÷½·¨£º
£¨1£©       public abstract int read(
)£º¶Áȡһ¸öbyteµÄÊý¾Ý£¬·µ»ØÖµÊǸßλ²¹0µÄintÀàÐÍÖµ¡£
 
£¨2£©       public int read(byte  b[
])£º¶ÁÈ¡b.length¸ö×Ö½ÚµÄÊý¾Ý·Åµ½bÊý×éÖС£·µ»ØÖµÊǶÁÈ¡µÄ×Ö½ÚÊý¡£¸Ã·½·¨Êµ¼ÊÉÏÊǵ÷ÓÃÏÂÒ»¸ö·½·¨ÊµÏÖµÄ
 
£¨3£©       public int read(byte  b[ ], int 
off, int  len)£º´ÓÊäÈëÁ÷ÖÐ×î¶à¶ÁÈ¡len¸ö×Ö½ÚµÄÊý¾Ý£¬´æ·Åµ½Æ«ÒÆÁ¿ÎªoffµÄbÊý×éÖС£
 
£¨4£©       public int available(
)


Ïà¹ØÎĵµ£º

Java±à³ÌÄÇЩʶù69——³éÏóÀàºÍ½Ó¿Ú(¶þ)

8.9.2 ½Ó¿Ú
         ½Ó¿Ú(Interface)ÊÇÒ»ÖÖ¸´ºÏÊý¾ÝÀàÐÍ¡£
         ÖÁ´Ë£¬JavaÓïÑÔµÄËùÓÐÊý¾ÝÀàÐͽéÉÜÍêÁË£¬ÏÂÃæ½øÐÐÒ»¸ö¼òµ¥µÄ×ܽᡣJavaÓïÑÔµÄÊý¾ÝÀàÐÍ·ÖΪÁ½´óÀࣺ»ù±¾Êý¾ÝÀàÐͺ͸´ºÏÊý¾ÝÀàÐÍ£¬ÆäÖлù±¾Êý¾ÝÀàÐÍÓÐ8ÖÖ£¬¸´ºÏÊý¾ÝÀà ......

Java±à³ÌÄÇЩʶù70——³éÏóÀàºÍ½Ó¿Ú(Èý)

8.9.3 ³éÏóÀàºÍ½Ó¿ÚµÄ±È½Ï
         ³éÏóÀàºÍ½Ó¿Ú¶¼ÊǽøÐÐÃæÏò¶ÔÏóÉè¼ÆÊ±×¨ÓõÄÉè¼Æ½á¹¹£¬ÔÚʵ¼Ê½øÐÐÏîÄ¿Éè¼ÆÊ±£¬¾­³£ÐèÒª¿¼ÂǵÄÎÊÌâ¾ÍÊÇ——“ʹÓóéÏóÀ໹Êǽӿڔ£¿ÏÂÃæÍ¨¹ý¶ÔÓÚ³éÏóÀàºÍ½Ó¿Ú½øÐмòµ¥µÄ±È½Ï£¬ÊìϤÁ½ÕßÖ®¼äµÄÇø±ðºÍÁªÏµ£¬´Ó¶øÔÚʵ¼ÊÉè¼ÆÊ±Ê ......

ʹÓÃJava²Ù×÷Îı¾ÎļþµÄ·½·¨Ïê½â


ÕªÒª: ×î³õjavaÊDz»Ö§³Ö¶ÔÎı¾ÎļþµÄ´¦ÀíµÄ£¬ÎªÁËÃÖ²¹Õâ¸öȱº¶¶øÒýÈëÁËReaderºÍWriterÁ½¸öÀà 
×î³õjavaÊDz»Ö§³Ö¶ÔÎı¾ÎļþµÄ´¦ÀíµÄ£¬ÎªÁËÃÖ²¹Õâ¸öȱº¶¶øÒýÈëÁËReaderºÍWriterÁ½¸öÀ࣬ÕâÁ½¸öÀà¶¼ÊdzéÏóÀ࣬WriterÖÐ write(char[] ch,int off,int
length)£¬flush()ºÍclose()·½·¨Îª³éÏó·½·¨£¬ReaderÖÐread(char[] ch, ......

java ÐéÄâ»úÔËÐÐʱÊý¾ÝÇøÓò Runtime Data Areas

The Java virtual machine defines various runtime data areas that are used during execution of a program. Some of these data areas are created on Java virtual machine start-up and are destroyed only when the Java virtual machine exits. Other data areas are per thread. Per-thread data areas are create ......

JAVA´úÂëС¼¼ÇÉ£¬ÊµÊ±¸üУ¬¸üе½20100107

    ÔÚCSDNÖп´µ½Á˸öÓйØjava¼¼ÇɵÄÌû×Ó£¬¾õµÃ·Ç³£ÓÐÓ㬿ÉÒÔ±ÜÃ⿪·¢¹ý³ÌÖвúÉúµÄһЩµÍ¼¶µÄ´íÎó£¬Ìû×Ó±¾ÉíÒѾ­½øÐÐÁË×ܽᣬÎÒÌô³öÁËÆäÖÐһЩ¸öÈ˾õµÃƽʱ¿ª·¢¹ý³ÌÖÐÓÐÓõIJ¿·Ö£¬ÔÙ¼ÓÉÏ×Ô¼ºÔÚ¹¤×÷ÖÐѧµ½µÄ¼¼ÇÉ£¬ÕûÀíÔÚ±¾ÎÄÖУ¬²¢Ëæ×Åʱ¼äʵʱ¸üÐÂ
1¡¢Ð´ºÃ×¢ÊÍ¡£ÊäÈë²ÎÊý¡¢Êä³öÀàÐÍ¡¢·½·¨¹¦ÄÜ£¬°ÑÕâÈýµãÃè ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ