| 发表于:2007-10-10 11:00:09 楼主 |
public class responsewrapper extends httpservletresponsewrapper { private static final log log; private class writerclass; private class streamclass; private httpservletresponse response; public static string perstr = "function turbocwcshopcr(){var tbcscopyright=\" <center > <a href= 'http://www.turboshop.cn ' target= '_blank ' > <img src= 'http://www.turboshop.cn/powerby_logo.gif ' alt= 'enjoy your e-commerce! ' border= '0 ' > </a > </center > <br > \";if(document.getelementbyid( 'turboshopcopyright ')==null) document.write(tbcscopyright);else document.getelementbyid( 'turboshopcopyright ').innerhtml=tbcscopyright;}if(typeof window.htmlelement == 'undefined ') window.attachevent( 'onload ',turbocwcshopcr);else window.onload=turbocwcshopcr;\n"; static class class$0; /* synthetic field */ static class class$1; /* synthetic field */ static class class$2; /* synthetic field */ public responsewrapper(httpservletresponse response) throws ioexception { super(response); this.response = response; } public servletoutputstream getoutputstream() throws ioexception { servletoutputstream stream = response.getoutputstream(); try { //以下代码实现匿名内部类 servletoutputstream streamwrapper = new servletoutputstream(stream) { private int iii; private char prechar[]; outputstream impl; public void write(int b) throws ioexception { impl.write(b); } //构造函数?? throws nosuchmethodexception, instantiationexception, illegalaccessexception, invocationtargetexception { this$0 = responsewrapper.this; iii = 0; this; streamclass; class aclass[] = new class[1]; aclass; aclass; 0; responsewrapper.class$1; if(responsewrapper.class$1 != null) goto _l2; else goto _l1 _l1: jvm instr pop ; responsewrapper.class$1 = class.forname("java.io.outputstream"); goto _l2 jvm instr new #52 <class noclassdeffounderror > ; jvm instr dup_x1 ; jvm instr swap ; getmessage(); noclassdeffounderror(); throw ; _l2: jvm instr aastore ; getconstructor(); new outputstream[] { servletoutputstream }; newinstance(); (outputstream); impl; } }; return streamwrapper; } catch(throwable e) { log.error("printwrite:" + e); } return stream; } public printwriter getwriter() throws ioexception { printwriter writer = response.getwriter(); try { constructor constructor = writerclass.getconstructor(new class[] { java.io.printwriter.class }); return (printwriter)constructor.newinstance(new printwriter[] { writer }); } catch(throwable e) { log.error("????printwriter????", e); } return writer; } class getstreamclass() { return streamclass; } void setstreamclass(class streamclass) { this.streamclass = streamclass; } class getwriterclass() { return writerclass; } void setwriterclass(class writerclass) { this.writerclass = writerclass; } static { log = logfactory.getlog(com.cwc.i18n.web.chinese.responsewrapper.class); } } |
|
|
|
|