´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓƵ2 IO ×Ôѧ±Ê¼Ç
´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓƵ2 IO ×Ôѧ±Ê¼Ç:
FileÀࣺ
1.IO°üÖÐΨһ´ú±í´ÅÅÌÎļþ±¾ÉíÐÅÏ¢µÄÀ࣬¶ø²»ÊÇÎļþÖÐÄÚÈÝ¡£
2.´´½¨¡¢É¾³ý¡¢ÖØÃüÃûÎļþµÈ·½·¨¡£
3.JavaÖÐĿ¼±»µ±×÷Ò»ÖÖÌØÊâÎļþʹÓã¬list·½·¨·µ»ØËùÓÐ×ÓĿ¼ºÍÎļþ¡£
4.UnixÏ·¾¶·Ö¸ô·û'/'£¬windowsÏ·ָô·ûΪ'\'¡£
RandomAccessFileÀà
Ö§³ÖËæ»ú·ÃÎÊ·½Ê½¡£
RandomAccessFileÀàÔÚËæ»ú(Ïà¶Ô˳Ðò¶øÑÔ)¶ÁдµÈ³¤¼Ç¼¸ñʽÎļþʱÓкܴóÓÅÊÆ¡£¿ÉÒÔ½«¼Ç¼µ±³ÉÒ»¸öÕûÌåÀ´¶ÁÈ¡¡£
RandomAccessFileÀà½öÏÞÓÚ²Ù×÷Îļþ£¬²»ÄÜ·ÃÎÊÆäËûIOÉ豸£¬ÈçÍøÂç¡¢ÄÚ´æÓ³Ïñ¡£
writeChars();
readChar();
Á÷£º×Ö½ÚÐòÁеijéÏó¸ÅÄî
ÎļþÊÇÊý¾ÝµÄ¾²Ì¬´æ´¢ÐÎʽ£¬¶øÁ÷ÊÇÊý¾Ý´«ÊäʱµÄÐÎ̬¡£
InputStream
int read() ¶ÁÈ¡Ò»×Ö½Ú¡£ÎªÊ²Ã´²»·µ»ØbyteÄØ£¿
ÒòΪ¶þ½øÖÆÐÎʽΪ11111111µÄÊý£¬ÒÔbyte±íʾΪ-1£¬ÒÔint±íʾΪ255¡£·µ»Ø-1±íʾ¶Áµ½Îļþβ¡£
int available();
OutputStream
void write(int b); // byteÔËËãʱ×Ô¶¯ÌáÉýΪint
flush();
FileInputStream¡¢FileOutputStream
PipedInputStream¡¢PipedOutputStream
ʹÓùܵÀÁ÷À࣬¿ÉÒÔʵÏÖ¸÷¸ö³ÌÐòÄ£¿é¼äµÄËÉñîºÏͨÐÅ¡£
ByteArrayInputStream¡¢ByteArrayOutputStream
ÓÃÓÚÒÔIOÁ÷·½Ê½À´Íê³É¶Ô×Ö½ÚÊý¾ÝÄÚÈݶÁдÀàËÆÄÚ´æÐéÄâÎļþ»òÄÚ´æÓ³ÏñÎļþ¹¦ÄÜ¡£
System.inÊÇInputStreamÀàÐÍ
System.outÊÇPrintStreamÀàÐÍ
²»¹Ü¸÷ÖֵײãÎïÀíÉ豸ÓÃʲô·½Ê½ÊµÏÖÊý¾ÝÖÕÖ¹µã£¬InputStreamµÄread·½·¨×ÜÒÔ-1±íʾ½áÊø¡£
windowsÏ£ºCtrl+Z±íʾ¼üÅÌÊäÈë½áÊø£¬Ctrl+C±íʾǿÖƽáÊø¡£
Unix/LinuxÏ£ºCtrl+D±íʾÊäÈë½áÊø
½¨Ò飺Ҫ±à³Ì´Ó¼üÅÌÉÏÁ¬Ðø¶ÁÈ¡Ò»´ó¶ÎÊý¾Ýʱ£¬Ó¦¾¡Á¿½«¶ÁÈ¡Êý¾ÝµÄ¹ý³Ì·ÅÔÚº¯ÊýÖУ¬Ê¹ÓÃ-1×÷ΪÊäÈë½áÊø¡£ÔÚº¯ÊýÖбàд´úÂë²»Ó¦Ö±½ÓʹÓÃSystem.in¶ÁÈ¡£¬¶øÓ¦ÓÃÒ»¸öInputStreamÀàÐ͵ÄÐβΣ¬È»ºó½«System.in×÷Ϊʵ²Î´«µÝ¸øº¯Êý¡£
×Ö·û±àÂ룺
1.¼ÆËã»úÀïÖ»ÓÐÊý×Ö£¬¼ÆËã»úÀïÒ»Çж¼ÊÇÓÃÊý×ÖÀ´±í
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
JDK1.4ÖÐ
Map map = new HashMap();
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
Object key = entry.getKey();
Object value = entry.getValue();
}
JDK1.5ÖÐ,Ó¦ÓÃÐÂÌØÐÔFor-EachÑ»·
Map m = new HashMap(); ......
20¡¢abstract classºÍinterfaceÓÐʲôÇø±ð?
¡¡¡¡ÉùÃ÷·½·¨µÄ´æÔÚ¶ø²»È¥ÊµÏÖËüµÄÀà±»½Ð×ö³éÏóÀࣨabstract class£©£¬ËüÓÃÓÚÒª´´½¨Ò»¸öÌåÏÖijЩ»ù±¾ÐÐΪµÄÀ࣬²¢Îª¸ÃÀàÉùÃ÷·½·¨£¬µ«²»ÄÜÔÚ¸ÃÀàÖÐʵÏÖ¸ÃÀàµÄÇé¿ö¡£²»ÄÜ´´½¨abstract ÀàµÄʵÀý¡£È»¶ø¿ÉÒÔ´´½¨Ò»¸ö±äÁ¿£¬ÆäÀàÐÍÊÇÒ»¸ö³éÏóÀ࣬²¢ÈÃËüÖ¸Ïò¾ßÌå×ÓÀàµÄÒ»¸öʵÀý¡£²»ÄÜÓг ......
58¡¢Ï̵߳Ļù±¾¸ÅÄî¡¢Ï̵߳Ļù±¾×´Ì¬ÒÔ¼°×´Ì¬Ö®¼äµÄ¹Øϵ
¡¡¡¡Ïß³ÌÖ¸ÔÚ³ÌÐòÖ´Ðйý³ÌÖУ¬Äܹ»Ö´ÐгÌÐò´úÂëµÄÒ»¸öÖ´Ðе¥Î»£¬Ã¿¸ö³ÌÐòÖÁÉÙ¶¼ÓÐÒ»¸öỊ̈߳¬Ò²¾ÍÊdzÌÐò±¾Éí¡£
JavaÖеÄÏß³ÌÓÐËÄÖÖ״̬·Ö±ðÊÇ£ºÔËÐС¢¾ÍÐ÷¡¢¹ÒÆð¡¢½áÊø¡£
59¡¢JSPµÄ³£ÓÃÖ¸Áî
<%@page language="java" csession="true" buffer="64kb" autoFlush ......
110¡¢J2EEÊÇʲô£¿
¡¡¡¡J2EEÊÇSun¹«Ë¾Ìá³öµÄ¶à²ã(multi-diered),·Ö²¼Ê½(distributed),»ùÓÚ×é¼þ(component-base)µÄÆóÒµ¼¶Ó¦ÓÃÄ£ÐÍ(enterpriese applicationmodel).ÔÚÕâÑùµÄÒ»¸öÓ¦ÓÃϵͳÖУ¬¿É°´ÕÕ¹¦ÄÜ»®·ÖΪ²»Í¬µÄ×é¼þ£¬ÕâЩ×é¼þÓÖ¿ÉÔÚ²»Í¬¼ÆËã»úÉÏ£¬²¢ÇÒ´¦ÓÚÏàÓ¦µÄ²ã´Î(tier)ÖС£ËùÊô²ã´Î°üÀ¨¿Í»§²ã(clietn tier)×é¼þ,web² ......