| 276 | } |
| 277 | |
| 278 | static String[] splitLines(String str) { |
| 279 | Vector v = new Vector(); |
| 280 | try { |
| 281 | BufferedReader br = new BufferedReader(new StringReader(str)); |
| 282 | String line; |
| 283 | while (true) { |
| 284 | line = br.readLine(); |
| 285 | if (line == null) break; |
| 286 | v.addElement(line); |
| 287 | } |
| 288 | br.close(); |
| 289 | } catch(Exception e) { } |
| 290 | String[] lines = new String[v.size()]; |
| 291 | v.copyInto((String[])lines); |
| 292 | return lines; |
| 293 | } |
| 294 | |
| 295 | /** Returns a sorted list of indices of the specified double array. |
| 296 | Modified from: http://stackoverflow.com/questions/951848 by N.Vischer. |