(x)=arguments D:\eclipse work4\javaenhance\binClassLoaderAttachme.class itcastlib- package cn.itcast.day2;
- import java.io.FileInputStream;
- import java.io.FileOutputStream;
- import java.io.InputStream;
- import java.io.OutputStream;
- public class MyClassLoader {
-
- 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);
- fis.close();
- fos.close();
-
- }
-
- private static void cypher(InputStream ips,OutputStream ops)throws Exception{
- int b = -1;
- while((b=ips.read())!=-1){
- ops.write(b^0xff);
- }
- }
-
- }
复制代码 Exception in thread "main" java.io.FileNotFoundException: D:\eclipse (系统找不到指定的文件。)
|
|