code: public Location write(byte[] data, WriteType write, WriteCallback callback) throws ClosedJournalException, IOException {
          Location loc = appender.storeItem(data, Location.USER_RECORD_TYPE, write.equals(WriteType.SYNC) ? true : false, callback);
          return loc;
      }
docs: Write the given byte buffer record, either sync (if
  {@code WriteType.SYNC}) or async (if {@code WriteType.ASYNC}), and
  returns the stored {@link Location}.<br/> A sync write causes all
  previously batched async writes to be synced too.<br/> The provided
  callback will be invoked if sync is completed or if some error occurs
  during syncing.
  
  @param data
  @param write
  @param callback
  @return
  @throws IOException
  @throws ClosedJournalException