/**
* 导入方法
* @throws IOException
* @throws ParseException
*/
public void Import() throws IOException, ParseException {
FileReader FileR = new FileReader("D:\\File\\ut.txt");
BufferedReader BufferedR = new BufferedReader(FileR);
String Imp = BufferedR.readLine();
String[] SS = Imp.split("\t");
list.clear();
while (Imp != null) {
byte Byteh = Byte.parseByte(SS[2]);
Date se = T.parse(SS[4].trim());
Date sr = T.parse(SS[5].trim());
int Num = Integer.parseInt(SS[0]);
Students S = new Students(Num, SS[1].trim(), Byteh, SS[3].trim(),
se, sr);
list.add(S);
System.out.println(Imp);
System.out.println(Imp);
Imp = BufferedR.readLine();
}
BufferedR.close();
FileR.close();
}
/**
* 导出方法
* @throws IOException
*/
public void Export() throws IOException {
System.err.println("正在导出......");
File F = new File("" + "D:\\File\\ut.txt");
OutputStream Q = new FileOutputStream(F, false);
for (int i = 0; i < list.size(); i++) {
Students SS = (Students) list.get(i);
byte[] v = (i + 1 + "\t" + SS.getName() + "\t" + SS.getAge() + "\t"
+ SS.getGenber() + "\t" + T.format(SS.getTime()) + "\t"
+ T.format(SS.getXtime()) + "\r\n").getBytes();
Q.write(v);
}
Q.close();
System.err.println("导出完毕");
}