易截截图软件、单文件、免安装、纯绿色、仅160KB

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();
}
}
}
}


相关文档:

sql 2005 存储过程分页 java 代码

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--每页显示记录条数
@currentpage int output,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式,1表示升序,0表示降序排列 ......

java使用rocksaw和vserv tcpip实现基于ICMP的Ping功能

一:准备 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窗口下进入 ......

Java IO学习

文件对象的生成和文件的创建
 
/*
 * ProcessFileName.java
 *
 * Created on 2006年8月22日, 下午3:10
 *
 * 文件对象的生成和文件的创建
 */
package study.iostudy;
import java.io.*;
public class GenerateFile
{
    public static void main(String ......

JAVA反射类

import java.lang.reflect.Array;
public class ReflectionTest {
    public static void main(String[] args) {
        try {
            Example obj = new Example();
            j ......

java中当前路径 相对路径

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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号