📄 readarrayfile.java
字号:
package net.aetherial.gis.our.tomap.years.array;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.File;
/**
* <p>Title: </p>
*
* <p>Description: 读取array数组文件</p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class ReadArrayFile {
private String arrayFile = "";
public ReadArrayFile() {
}
public void read() throws Exception{
BufferedReader in = new BufferedReader (new InputStreamReader (new FileInputStream (arrayFile)));
}
/**
* 得到数组文件
*/
protected File getArrayFile(String filename,String arrayName){
File file = new File(filename);
if(file.isDirectory()){
return new File(this.getDirectoryString(filename) + arrayName);
}else{
return new File(filename);
}
}
/**
* 得到带有\\的字符串
*/
private String getDirectoryString(String str){
if (str.endsWith("\\")) {
return str;
}
else if (str.endsWith("/")) {
return str;
}
else {
return str + "\\";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -