@Test void readonly() throws IOException, ComponentLifecycleException { this.tail.initialize(new File(this.tmpDir, "log").toPath(), false); this.tail.error("error0"); this.tail.error("error1"); this.tail.dispose(); assertNull(this.tail.logStore); assertTrue(this.tail.open()); assertNotNull(this.tail.logStore); this.tail.close(true); assertNull(this.tail.logStore); this.tail.initialize(new File(this.tmpDir, "log").toPath(), true); assertEquals("error0", this.tail.getLogEvent(0).getMessage()); assertEquals("error1", this.tail.getLogEvent(1).getMessage()); assertEquals(2, this.tail.getLogEvents(0, -1).stream().count()); assertNull(this.tail.logStore); this.tail.error("error2"); assertNull(this.tail.getLogEvent(2)); }
@Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); } }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }  }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }  @Override void initialize(Path path, boolean readonly); static boolean exist(Path path); }
XStreamFileLoggerTail extends AbstractTextFileLoggerTail { @Override public void initialize(Path path, boolean readonly) throws IOException { super.initialize(path, StandardCharsets.UTF_8, readonly); }  @Override void initialize(Path path, boolean readonly); static boolean exist(Path path);  }