code: @Override
      public ZeroCopyFileWriter write(String event) {
  //        String realPath = FileHandlerUtil.generateOutputFilePath(path);
  
          String realPath = FileHandlerUtil.generateOutputFilePath(
      			path, 
      			FileHandlerUtil.generateAuditFileName());
  
          try {
             /** Close last instance for random access file. **/
  			if (randomAccessFile != null && !realPath.equals(lastRealPath)) {
  				this.stop();
  			}
  			
  			if (randomAccessFile == null) {
  				lastRealPath = realPath;
  				randomAccessFile = new RandomAccessFile(new File(realPath), CoreConstants.READ_WRITE);
  			}
          } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          fileChannel = randomAccessFile.getChannel();
          
          String str2 = event + CoreConstants.NEW_LINE;
  
          long numBytes = str2.getBytes().length;
  
          InputStream inputStream = new ByteArrayInputStream(str2.getBytes(Charset.forName("UTF-8")));
  
          try {
  
              // move the cursor to the end of the file
              randomAccessFile.seek(randomAccessFile.length());
  
              // obtain the a file channel from the RandomAccessFile
              try (ReadableByteChannel inputChannel = Channels.newChannel(inputStream);) {
                  fileChannel.transferFrom(inputChannel, randomAccessFile.length(), numBytes);
              } catch (IOException e) {
                  e.printStackTrace();
              }
  
          } catch (IOException e) {
              e.printStackTrace();
          }
          return this;
      }
docs: /*
  (non-Javadoc)
  
  @see
  org.audit4j.core.io.AuditOutputStream#write(org.audit4j.core.dto.AuditEvent
  )