throw new RuntimeException(e);
}
}
private FileInputStream openNextInput() {
PendingMessage next = pendingReplays.poll();
while (next != null) {
if (next.getFile().exists()) {
return scanner.forceInput(next.getFile(), next.getOffset());
} else {
log.error("Replay file {} has disappeared", next.getFile());
}
next = pendingReplays.poll();
}
// look for a new file