@Test public void testGetFileList() throws Exception{ }
public ArrayList getFileList(){ ArrayList<String> arrayList = new ArrayList<String>(); FileReader fr = null; try{ if (!file.exists()) return null; fr = new FileReader(file); BufferedReader bf = new BufferedReader(fr); String str; while ((str = bf.readLine()) != null) { arrayList.add(str); } if(arrayList.size()==0) return null; else return arrayList; } catch (Throwable ex) { ex.printStackTrace(); } finally { try { if (fr != null) fr.close(); } catch (IOException e) { e.printStackTrace(); } } return null; }
OneFileUtil { public ArrayList getFileList(){ ArrayList<String> arrayList = new ArrayList<String>(); FileReader fr = null; try{ if (!file.exists()) return null; fr = new FileReader(file); BufferedReader bf = new BufferedReader(fr); String str; while ((str = bf.readLine()) != null) { arrayList.add(str); } if(arrayList.size()==0) return null; else return arrayList; } catch (Throwable ex) { ex.printStackTrace(); } finally { try { if (fr != null) fr.close(); } catch (IOException e) { e.printStackTrace(); } } return null; } }
OneFileUtil { public ArrayList getFileList(){ ArrayList<String> arrayList = new ArrayList<String>(); FileReader fr = null; try{ if (!file.exists()) return null; fr = new FileReader(file); BufferedReader bf = new BufferedReader(fr); String str; while ((str = bf.readLine()) != null) { arrayList.add(str); } if(arrayList.size()==0) return null; else return arrayList; } catch (Throwable ex) { ex.printStackTrace(); } finally { try { if (fr != null) fr.close(); } catch (IOException e) { e.printStackTrace(); } } return null; } OneFileUtil(File file); }
OneFileUtil { public ArrayList getFileList(){ ArrayList<String> arrayList = new ArrayList<String>(); FileReader fr = null; try{ if (!file.exists()) return null; fr = new FileReader(file); BufferedReader bf = new BufferedReader(fr); String str; while ((str = bf.readLine()) != null) { arrayList.add(str); } if(arrayList.size()==0) return null; else return arrayList; } catch (Throwable ex) { ex.printStackTrace(); } finally { try { if (fr != null) fr.close(); } catch (IOException e) { e.printStackTrace(); } } return null; } OneFileUtil(File file); ArrayList mergeByFlagline(String startflagline,String endflagline,ArrayList filelist); ArrayList getFileList(); }
OneFileUtil { public ArrayList getFileList(){ ArrayList<String> arrayList = new ArrayList<String>(); FileReader fr = null; try{ if (!file.exists()) return null; fr = new FileReader(file); BufferedReader bf = new BufferedReader(fr); String str; while ((str = bf.readLine()) != null) { arrayList.add(str); } if(arrayList.size()==0) return null; else return arrayList; } catch (Throwable ex) { ex.printStackTrace(); } finally { try { if (fr != null) fr.close(); } catch (IOException e) { e.printStackTrace(); } } return null; } OneFileUtil(File file); ArrayList mergeByFlagline(String startflagline,String endflagline,ArrayList filelist); ArrayList getFileList();  }