java编程文件拷贝
import java.io.FileInputStream;
public class FileCopy{
public static void main(String[] args){
try{
FileInputStream fis =new FileInputstream("c:\\wenjian.txt");//需要自己在c盘根目录下建立该文件
FileOutputStream fos=new FileOutputStream("c:\\test.txt");//需要自己在c盘根目录下建立该文件
int x=fis.read();//读取文件wenjian.txt中的内容
while(x!=-1){
fos.write(x);//写到文件test.txt中
x=fis.read();//读下一个字符
}
System.out.println("Copy success!");
catch(Exception e){
e.printStackTrace();
}
}
}
}
相关文档:
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--每页显示记录条数
@currentpage int output,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式,1表示升序,0表示降序排列
......
一:准备 www.savarese.org download
1. rocksaw-1.0.0-src.tar.gz
2. vserv-tcpip-0.9.2-src.tar.gz
二:编译源文件得到jar包 使用Ant
1. build vserv-tcpip-0.9.2-src
在vserv-tcpip-0.9.2目录下面建一个tests目录,然后在cmd窗口下进入 ......
文件对象的生成和文件的创建
/*
* ProcessFileName.java
*
* Created on 2006年8月22日, 下午3:10
*
* 文件对象的生成和文件的创建
*/
package study.iostudy;
import java.io.*;
public class GenerateFile
{
public static void main(String ......
import java.lang.reflect.Array;
public class ReflectionTest {
public static void main(String[] args) {
try {
Example obj = new Example();
j ......
public class FilePath {
public void Print() {
String a = this.getClass().getClassLoader().getResource(".").getPath();
String b = this.getClass().getResource("").getPath();
String c = this.getClass().getResource(" ").getPath();
&n ......