IOÓëÎļþ¶Áд JavaµÄIOÁ÷¼Ü¹¹
¡¾Ò»¡¿»ùÓÚ×Ö½ÚµÄÊäÈëÁ÷
ÖµµÃ×¢ÒâµÄµØ·½ÓУº
¢ÙLevel 2µÄÊäÈëÁ÷£¬´ó¶àÊý¶¼»áÖ¸Ã÷Êý¾ÝÔ´µÄÐÎʽ£ºÀýÈçByteArray£¬File£¬Piped
¢ÚLevel 3µÄÊäÈëÁ÷£¬Ôò²»»á³öÏÖ¾ßÌåµÄÊý¾ÝÔ´Ãû×Ö£¬¶øÊÇÒÔ¹¦ÄÜÈ¡´ú£ºÀýÈçBuffered£¬LineNumber
ËùÒÔ˵Level 3µÄÊäÈëÁ÷ÊǶÔLevel 2ÊäÈëÁ÷µÄ“·â×°ºÍ¹ýÂË”¡£Êµ¼ÊÉÏLevel 2µÄÊäÈëÁ÷£¬¶¼¼Ì³ÐÓÚÒ»¸ö½Ð×ö£ºFilterInputStreamµÄÊäÈëÁ÷¡£
ÏÂÃæÊǶԸ÷¸öinput streamµÄ¼ò½é£º
¢ÙByteArrayInputStream
´ÓÄÚ´æÖÐÿ´Î¶ÁÈ¡Ò»¸ö×Ö½ÚµÄÊý¾Ý£¬È»ºó±£´æµ½ÄÚÖõĻº³åÇøÖС£Î¬³ÖÒ»¸ö¼ÆÊýÆ÷ÓÃÀ´¼Ç¼´ÓÊý¾ÝÔ´ÖжÁÈëµÄ×Ö½ÚÊýÄ¿¡£
µ÷ÓøÃÊäÈëÁ÷µÄclose()·½·¨²»»á²úÉúÈκÎʵ¼ÊµÄ×÷Óá£ÒòΪËü“¹Ø±Õ”µÄ¶ÔÏóÊÇ---ÄÚ´æ¡£¶ø²»ÊÇÎļþ¡£²»»áÅ׳öÈκεÄIOException¡£
¢ÚFileInputStream
´ÓÎļþϵͳÖжÁÈ¡ÔʼµÄ×Ö½ÚÊý¾Ý(raw bytes)¡£Ã¿´Î¶ÁÈ¡Ò»¸ö×Ö½Ú
¢ÛPipedInputStream
¹ÜµÀÊäÈëÁ÷£¬Í¨³£ËüµÄÒ»¶Ë»áºÍÊý¾ÝÔ´Á¬½Ó£¬ÁíÒ»¶ËºÍ¹ÜµÀÊä³öÁ÷(PipedOutputStream) Á¬½Ó¡£ÕâÑù´Ó¹ÜÊäÈëÁ÷¶ÁÈëµÄÈκÎÊý¾Ý½«Ö±½ÓµØ´«Êäµ½¹ÜµÀÊä³öÁ÷¡£
ͨ³£»áÓÐÒ»¸ö¶ÀµÄÏ̴߳ӹܵÀÊäÈëÁ÷ÖжÁÈ¡Êý¾Ý£¬ÔÙ½»¸øÁíÍâÒ»¸öỊ̈߳¬ÓÉÁíÍâµÄÏß³ÌÏò¹ÜµÀÊä³öÁ÷ÖÐдÊý¾Ý¡£Èç¹ûʹÓõ¥¸öÏ߳̽øÐжÁд²Ù×÷£¬ºÜÈÝÒ×Ôì³É×ÊÔ´µÄËÀËø¡£
¢ÜSequenceInputStream
°Ñ¶à¸öÊäÈëÁ÷°´Ë³ÐòºÏ²¢³ÉÒ»¸öÊäÈëÁ÷
¢ÝDataInputStream
´Óµ×²ãµÄÆäËü×Ö½ÚÊäÈëÁ÷ÖжÁÈ¡×Ö½Ú£¬È»ºóת»»³ÉÓë»úÆ÷Î޹صÄÔʼÀàÐÍÊý¾Ý(boolean£¬byte£¬char)
¢ÞBufferedInputStream
Ϊµ×²ãµÄÆäËü×Ö½ÚÊäÈëÁ÷Ôö¼ÓÒ»¸ö“»º³å”µÄ¹¦ÄÜ£¬³ý´ËÖ®Í⻹¿ÉÒÔ“±ê¼Ç”£¬“ÖØÖÔÊäÈëÁ÷¡£µ±Õâ¸öÊä³öÁ÷µÄ¶ÔÏó±»´´½¨Ê±£¬Ò»¸öÄÚÖõĻº³åÇøÒ²¾Í±»´´½¨ÁË¡£
Ëæ×ŵײãµÄÊäÈëÁ÷µÄ²»¶Ï¶ÁÈ룬»º³åÇøÖеÄÊý¾ÝÒ²ÔÚ²»Í¬Ë¢Ð¡£Ò»´ÎÐԵشӵײãµÄÊäÈëÁ÷¶ÁÈë¶à¸ö×Ö½Ú£¬·½±ãºóÐøµÄתÂ빤×÷
¡¾¶þ¡¿»ùÓÚ×Ö½ÚµÄÊä³öÁ÷
ÖµµÃ×¢ÒâµÄÊÇ:
¢ÙÔÚLevel 2µÄÊä³öÁ÷£¬¶¼ÊÇÒÔ¹¦ÄÜÀ´ÃüÃûµÄ¡£ÀýÈ磺Print£¬DataOutput£¬Buffered
¢ÚÔÚLevel 3µÄÊä³öÁ÷£¬Ôò¶àÊý¶¼ÊÇÒÔÊý¾ÝÔ´µÄÐÎʽÀ´ÃüÃûµÄ¡£ÀýÈ磺ByteArray£¬File£¬Piped
ËùÒÔ˵Level 2µÄÊä³öÁ÷±ØÐëÒÀÀµÓÚLevel 3µÄÊä³öÁ÷£¬Êµ¼ÊÉÏLevel 2µÄÊä³öÁ÷£¬¶¼¼Ì³ÐÓëÒ»¸ö½Ð×öFilterOutputStreamµÄÊä³öÁ÷
ÏÂÃæÊǶԸ÷¸öoutput streamµÄ¼ò½é£º
¢ÙPrintStream
Ϊµ×²ãµÄÊä³öÁ÷Ìí¼Ó¶îÍâµÄ¹¦ÄÜ£¬Áîµ½µ×²ãµÄÊä³öÁ÷¿ÉÒÔ·½±ãµØÊä³ö¸÷ÖÖ¾¹ý“¸ñʽ»¯”µÄÊý¾Ý¡£ºÍÆäËüÊä³öÁ÷²»Í¬£¬¸ÃÊä
Ïà¹ØÎĵµ£º
import java.io.IOException;
public class test {
/**
* ±àÂë
* @param filecontent
* @return String
*/
public static String encode(byte[] bstr){
return new sun.misc.BASE64Encoder().encode(bstr);
}
/**
* ½âÂë
* @param filecontent
* @return string
*/
public static ......
3.3 ÓαêÑ»·×î¼Ñ²ßÂÔ
ÎÒÃÇÔÚ½øÐÐPL/SQL±à³Ìʱ£¬¾³£ÐèҪѻ·¶ÁÈ¡½á¹û¼¯µÄÊý¾Ý¡£½øÐÐÖðÐд¦Àí£¬Õâ¸ö¹ý³Ì¾ÍÐèÒª¶ÔÓαê½øÐÐÑ»·¡£¶ÔÓαê½øÐÐÑ»·µÄ·½·¨ÓжàÖÖ£¬ÎÒÃÇÔÚ´ËÒ»Ò»·ÖÎö¡£
create or replace procedure proccycle(p varchar2)
as
cursor c_postype is select pos_type, description ......
¶¯Ì¬´úÀí£º
public interface Qingke {
void qk();
}
public class dsz implements Qingke{
public void qk() {
System.out.print("dsz qk");
}
}
public class Secretary implements InvocationHandler {
private Object pro;
private dsz dsz;
public Obj ......
javaÀûÓÃsmslib·¢ËͶÌÐÅ.
×Ô¼ºÐ´Ò»¸öС³ÌÐò,ÎÒÔÚjava1.6.0_10;smslib-v3.4.5ÏÂÔËÐгɹ¦. ¿ÉÒÔÎÒµÄ×ÊÔ´ÀïÃæÏÂÔØ.
http://hi.csdn.net/link.php?url=http://yangzl0123.download.csdn.net
,Ö÷ÒªÊÇÒÔϼ¸¸öÀà.
Level_Final_Serial.java:´®¿Úµ×²ã²Ù×÷
Serial_For_Smslib.java:¶ÔLevel_Final_SerialµÄ½øÒ»²½·â×°,¿ÉÒÔÖ±½Ó·¢ ......
¡¡1¡¢FACTORY—×·MMÉÙ²»ÁËÇë³Ô·¹ÁË£¬Âóµ±À͵ļ¦³áºÍ¿ÏµÂ»ùµÄ¼¦³á¶¼ÊÇMM°®³ÔµÄ¶«Î÷£¬ËäÈ»¿ÚζÓÐËù²»Í¬£¬µ«²»¹ÜÄã´øMMÈ¥Âóµ±ÀÍ»ò¿ÏµÂ»ù£¬Ö»¹ÜÏò·þÎñԱ˵“À´Ëĸö¼¦³á”¾ÍÐÐÁË¡£Âóµ±ÀͺͿϵ»ù¾ÍÊÇÉú²ú¼¦³áµÄFactory
¡¡¡¡¹¤³§Ä£Ê½£º¿Í»§ÀàºÍ¹¤³§Àà·Ö¿ª¡£Ïû·ÑÕßÈκÎʱºòÐèҪijÖÖ²úÆ·£¬Ö»ÐèÏò¹¤³§ÇëÇó¼´¿É¡£Ïû· ......