A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class MyClassLoader  extends ClassLoader{
        public static void main(String[] args) throws Exception {
                String  srcPath=args[0];
                String  destDir=args[1];
                FileInputStream  fis=new FileInputStream(srcPath);
        String destFileName=srcPath.substring(srcPath.lastIndexOf(
                        '\\')+1);
        String destPath=destDir+"\\"+destFileName;
        FileOutputStream  fos=new FileOutputStream(destPath);
        cypher(fis,fos);
        }

        public static void cypher(FileInputStream ips, FileOutputStream ops) throws Exception {
                int b=-1;
                while ((b=ips.read())!=-1) {
                        ops.write(b ^ 0xff);
                       
                }       
        }
import java.util.Date;

public class ClassLoaderAttachment extends Date {
        public String  toString(){
                return "hello,itcast";
               
        }
}

2 个回复

正序浏览
爱上在路上 发表于 2014-8-14 18:32
我没看出来,楼下继续

                 好吧
回复 使用道具 举报
我没看出来,楼下继续
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马