}
this.indexInterval = indexInterval;
this.currentTimestamp = -1L;
Function<OutputStream, Encoder> encoderFactory = createEncoderFactory();
this.encoder = new BufferedEncoder(BUFFER_SIZE, encoderFactory);
this.lengthEncoder = new BufferedEncoder(5, encoderFactory);
try {
init();
} catch (IOException e) {
Closeables.closeQuietly(eventOutput);