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

Java Dynamic Proxy

import java.lang.reflect.*;
public class A extends Thread  {
    
    public static void main(String[] args) throws Exception{
    CC cc = new CC();
    HH hh = new HH(cc);
    II ii = (II) Proxy.newProxyInstance(HH.class.getClassLoader(),
                        new Class[]{II.class},
                        hh);
    System.out.println ("" + ii.getClass().getName());
    ii.test();
    }
}
interface II {
    void test();
}
class CC implements II {
    public void test() {
    System.out.println ("this is cc");
    }
}
class HH implements InvocationHandler {
    Object obj;
    HH(Object obj) {
    this.obj = obj;
    }
    
    public Object invoke(Object obj, Method m, Object[] args) throws Exception {
    System.out.println ("start");
    Object o = m.invoke(this.obj, args);
    System.out.println ("end");
    return o;
    }
}
ÔËÐÐʱ¼ÓÈë -Dsun.misc.ProxyGenerator.saveGeneratedFiles=true£¬¿ÉÒԵõ½proxy class¡£
²Î¿¼£ºhttp://www.javablogging.com/what-is-java-dynamic-proxies-api/
 


Ïà¹ØÎĵµ£º

ÎÄ˼´´ÐÂÈí¼þ·þÎñ²¿11ÔÂ×îÐÂְλ¸üРjava c++

ÎÄ˼ÐÅÏ¢¼¼ÊõÓÐÏÞ¹«Ë¾www.vanceinfo.com£¨Å¦½»ËùÉÏÊдúÂ룺VIT£©³ÉÁ¢ÓÚ1995Ä꣬ÊÇÒ»¼ÒÐÅÏ¢¼¼Êõ·þÎñÌṩÉ̼°ÔÚÖйú¾ÓÁìÏȵØÎ»µÄÀë°¶Èí¼þ¿ª·¢¹«Ë¾Ö®Ò»¡£ÎÄ˼ÊǵÚÒ»¼ÒÔÚŦԼ¹ÉƱ½»Ò×ËùÉÏÊеÄÖйúÈí¼þ·þÎñÍâ°üÆóÒµ¡£¾Ý¹ú¼ÊÊý¾Ý¹«Ë¾(IDC)µÄͳ¼Æ, ÒÔ2007ÄêÏúÊÛ¶îºâÁ¿, ÎÄ˼ÐÅÏ¢¼¼ÊõÔÚΪŷÃÀÊг¡ÌṩÀë°¶Èí¼þ¿ª·¢ÐÐÒµÖÐλ¾ÓÖйúµÚÒ ......

Java¶ÁÈ¡´óÎļþ

Óöµ½¹ýÕâÑùÒ»¸öÇé¿ö£¬ÐèÒªÓÃjava¶Áȡһ¸ö200MµÄÎı¾¸ñʽÎļþ£¬¶øÇÒ»¹ÐèÒª¶ÔÎļþµÄÄÚÈÝ×ö½âÎö£¬½øÐзִʡ£Èç¹ûÓÃJVMµÄĬ
ÈÏÉèÖã¬ÀûÓÃScannerÀàÖ»ÄܶÁ³ö4M´óСÄÚÈÝ£¬ÓÚÊÇÎÒ¾ÍÔÚÍøÉÏËÑË÷£¬µ«ÊÇÍøÉÏûÓÐÕÒµ½Ò»ÆªÎÄÕÂÊÇÎÒËùÐèÒªµÄÄÚÈÝ¡£ÓÚÊÇÎÒÖ»ºÃ·­thinking
in
java£¬·¢ÏÖÁËÒ»¸öjavaµÄnioÀïÓиöMappedByteBufferÀ࣬ËûµÄ×÷Ó ......

java Óë c# 3des ¼Ó½âÃÜ

 
java Óë c# 3des ¼Ó½âÃÜ 
Ö÷Òª²îÒìÈçÏ£º
1¡¢ ¶ÔÓÚ´ý¼ÓÃܽâÃܵÄÊý¾Ý£¬¸÷×ÔµÄÌî³äģʽ²»Ò»Ñù
C#µÄģʽÓУºANSIX923¡¢ISO10126¡¢None¡¢PKCS7¡¢Zero£¬¶øJavaÓУºNoPadding¡¢PKCS5Padding¡¢SSL3Padding
2¡¢ ¸÷×ÔĬÈϵÄ3DESʵÏÖ£¬Ä£Ê½ºÍÌî³ä·½Ê½²»Ò»Ñù
C#µÄĬÈÏģʽΪCBC,ĬÈÏÌî³ä·½Ê½ÎªPKCS7; javaµÄĬÈÏģʽ ......

java½Ó¿ÚʵÏÖ

java½Ó¿ÚʵÏÖ
¶Ô³õѧÕßÀ´Ëµ£¬½Ó¿Ú²»ÊǺܺÃÀí½â¡£ÏÖ½«Ä³¸ßÊÖµÄһƪÎÄÕÂÌù³öÀ´£¬¹²´ó¼Ò·ÖÏí£¡
ÎÒÃÇÀ´¿´Ò»¸öÀà
class A {
private int a;
public int getA() {
return a;
}
}
Õâ¸öÀàµÄÊôÐÔÊÇ˽Óеģ¬Íâ½ç²»ÄÜ·ÃÎÊ£¬¶øÍâ½ç¿ÉÒÔͨ¹ý¹«Óз½·¨À´·ÃÎÊÕâ¸öÀà¡£ÎÒÃÇ˵һ¸öÀàµÄ¹«Óз½
·¨¾ÍÊÇÕâ¸öÀàµÄ¶ÔÍâ½Ó¿Ú¡£Í¨³£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ