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

📄 projectfileimput.java

📁 主要为一个空间信息管理系统
💻 JAVA
字号:
package edu.whu.poly;
import java.io.*;
import java.util.StringTokenizer;
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class ProjectFileImput
{
  public ProjectFileImput()
  {

  }
  public void ProjectFileImput_fileImput()
  {
    try
    {
      polyRecord precord = new polyRecord("./");
      InputStream fileIn = new FileInputStream("f:\\工程信息.txt");
      BufferedReader in =
          (new BufferedReader(new InputStreamReader(fileIn)));
      String td1=null;
      String td2=null;
      String td3=null;
      String rname=null;
      String rx=null;
      String ry=null;
      String s;
      int number=1;
      while ( (s = in.readLine()).length() != 0)
      {
        StringTokenizer Filedata = new StringTokenizer(s, ",");
        td1=Filedata.nextToken();
        if(td1!=null)
        {
          rname=td1;
        }
        try
        {
          while (Filedata.hasMoreTokens())
          {
            td2 = Filedata.nextToken();
            if (td2 != null)
            {
              rx = td2;
            }
            td3 = Filedata.nextToken();
            if (td3 != null)
            {
              ry = td3;
            }
            if (rname != null && rx != null && ry != null)
            {
             // recordStruct record = new recordStruct(number, rname, rx, ry,
            //      "c:\\1.txt", "d:\\2.txt", "f:\\3.txt", "张三");
           //   if (precord.Insert(record))
         //     {
        //        System.out.println("insert ok" + number);
       //         number++;
       //       }
        //      else
       //       {
       //         System.out.println("insert fail" + number);
        //      }
            }
          }
        }
        catch (Exception e2)
        {
          continue;
        }
      }
        // An empty line terminates the program
    }
    catch (IOException e)
    {

      //e.printStackTrace();
    }

  }
  public void tt()
  {
    int k=1111111;
    System.out.println(k);
  }
  public static void main(String args[])
  {
    ProjectFileImput imput=new ProjectFileImput();
    //imput.tt();
    imput.ProjectFileImput_fileImput();
  }

}

⌨️ 快捷键说明

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