code: private final void write(byte dataType, int timestamp, ITag tag) {
          if (tag != null) {
              // only allow blank tags if they are of audio type
              if (tag.getBodySize() > 0 || dataType == ITag.TYPE_AUDIO) {
                  try {
                      if (timestamp >= 0) {
                          if (!writer.writeTag(tag)) {
                              log.warn("Tag was not written");
                          }
                      } else {
                          log.warn("Skipping message with negative timestamp");
                      }
                  } catch (ClosedChannelException cce) {
                      // the channel we tried to write to is closed, we should not try again on that writer
                      log.error("The writer is no longer able to write to the file: {} writable: {}", path.getFileName(), path.toFile().canWrite());
                  } catch (IOException e) {
                      log.warn("Error writing tag", e);
                      if (e.getCause() instanceof ClosedChannelException) {
                          // the channel we tried to write to is closed, we should not try again on that writer
                          log.error("The writer is no longer able to write to the file: {} writable: {}", path.getFileName(), path.toFile().canWrite());
                      }
                  }
              }
          }
      }
docs: Adjust timestamp and write to the file.
  
  @param queued
  queued data for write