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

📄 tonewxiangzhen.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.jiaotongbu.output.type;

import net.aetherial.gis.table.WuWei;
import net.aetherial.gis.jiaotongbu.output.number.NameNumber;
import net.aetherial.gis.jiaotongbu.output.publicuse.Item;
import net.aetherial.gis.publicuse.StringOper;
import java.io.IOException;
import java.io.File;
import net.aetherial.gis.surface.CreateFile;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class ToNewXiangzhen {
  WuWei ww = new WuWei();
  String n = "";
  NameNumber[] xiangz = null;
  public ToNewXiangzhen() {
    this.test();
  }

  private void test(){
    xiangz = Item.xian.getChildren();
    boolean find = false;
    for (int i = 0; i < ww.wuwei.length; i++) {
      find = false;
      for (int j = 0; j < xiangz.length; j++) {
        if (StringOper.isInclude(ww.wuwei[i][0],xiangz[j].getName())) {
          this.n = n + (i+1)+"\t" + ww.wuwei[i][0] + "\t" + xiangz[j].getNumber()+"\r\n";
          find = true;
          break;
        }
      }
      if (!find) {
        this.n = n + (i+1)+"\t" + ww.wuwei[i][0] + "\t"+"\r\n";
      }
    }
  }

  public String getN(){
    return this.n;
  }

  private String getSplashPath(String path){
    if (path.endsWith("\\")) {
      return path;
    }
    else if (path.endsWith("/")) {
    return path;
    }
    else {
    return path + "\\";
    }
  }

  public void toFile(String filePath){
    File f = new File(getSplashPath(filePath) +Item.xian.getName() + "NewXZ.txt");
    try {
      f.createNewFile();
    }
    catch (IOException ex) {
    }
    CreateFile cf = new CreateFile(f);

    cf.setEncode(System.getProperty("file.encoding"));
    cf.memoryToFile(this.n);
  }
}

⌨️ 快捷键说明

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