Share Pastebin
Guest
Public paste!

Andrew

By: a guest | Mar 22nd, 2010 | Syntax: Java | Size: 0.37 KB | Hits: 156 | Expires: Never
Copy text to clipboard
  1.         public ArrayList readChar(String otherPName) {
  2.                 ArrayList<String> lines = new ArrayList<String>();
  3.                 try {
  4.                         BufferedReader in = new BufferedReader(new FileReader(
  5.                                         "./Data/characters/" + otherPName + ".txt"));
  6.                         String str;
  7.                         while ((str = in.readLine()) != null) {
  8.                                 lines.add(str);
  9.                         }
  10.                         in.close();
  11.                 } catch (Exception e) {
  12.                 }
  13.                 return lines;
  14.         }