Returns the entries of the specified log file. @return log entries @throws IOException I/O exception
()
| 55 | * @throws IOException I/O exception |
| 56 | */ |
| 57 | public StringList read() throws IOException { |
| 58 | synchronized(file) { |
| 59 | final StringList list = new StringList(); |
| 60 | try(NewlineInput nli = new NewlineInput(file)) { |
| 61 | for(String line; (line = nli.readLine()) != null;) list.add(line); |
| 62 | } |
| 63 | return list; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Deletes the specified log file. |