⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textcopy.java

📁 内涵了200个适合Java初学者学习的小程序
💻 JAVA
字号:
import java.lang.*;
import java.io.*;


public class TextCopy extends Object
{


/*
method:       main
params:
              1. String[] args
return type:  void
create time:  2004-08-25 23:20:52
author:       litertiger
*/
public  static void main(String[] args)
{
 byte[] b1=new byte[255];
 byte[] b2=new byte[255];
 byte[] b3=new byte[2056];
 byte[] b4=new byte[2056];
 
 try{
    System.out.println("input the name:\n");
    System.in.read(b1,0,255);
    System.out.println("please input the destination\n");
    System.in.read(b2,0,255);
    String sourceName=new String (b1,0);
    String desName=new String (b2,0);
    FileInputStream fileInput=new FileInputStream(sourceName);
    int byte1=fileInput.read(b3.0,2056);
    FileOnputStream fileOutput=new FileOnputStream(desName);
    Fileoutput.write(b3,0,bytes1);
    fileInput=new FileInputStream(desName);
    String desFile=new String(b4,0,0,bytes2);
    System.out.println("源文件的内容是:\n");
    System.out.println(desFile);
}
catch(Exception e)
{System.out.println(e.toString());
}
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -