{@inheritDoc}

@see org.audit4j.core.io.AuditOutputStream#write(org.audit4j.core.dto.Event)
332082
@Override
    public AsyncAuditOutputStream write(AuditEvent event) {
        if (event instanceof AnnotationAuditEvent) {
            annotationStream.write((AnnotationAuditEvent) event);
        } else {
            deferred.accept(event);
            b.await();
        }
        
        return this;
    }
1230854
@Override
  public boolean writeEvent(AuditEvent event) throws HandlerException {
    StringBuilder elements = new StringBuilder();
    for (Field element : event.getFields()) {
      elements.append(
        element.getName() + " " + element.getType() + ":" + element.getValue() + ", ");
    }

    try (Connection conn = getConnection()) {
      try (PreparedStatement statement = conn.prepareStatement(insertQuery)) {
        statement.setString(1, event.getUuid().toString());
        statement.setTimestamp(2, new Timestamp(event.getTimestamp().getTime()));
        statement.setString(3, event.getActor());
        statement.setString(4, event.getOrigin());
        statement.setString(5, event.getAction());
        statement.setString(6, elements.toString());

        return statement.execute();
      }
    } catch (SQLException e) {
      throw new HandlerException("SQL Exception", DatabaseAuditHandler.class, e);
    }
  }
1230869
@Override
  public void write(JdbcEntryData record) throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Writing " + record);
    }
    try {
      this.commands.insert(this.databaseName, this.tableName, record);
      this.recordWrittenCount++;
    } catch (Exception e) {
      this.failed = true;
      throw new RuntimeException(e);
    }
  }
917163
public void write(Model project, Document document, Writer writer, Format jdomFormat) throws java.io.IOException
   {
      updateModel(project, "project", new Counter(0), document.getRootElement());

      XMLOutputter outputter = new XMLOutputter();
      outputter.setFormat(jdomFormat);
      outputter.output(document, writer);
   }
1080039
@Override
  public void write(JsonWriter writer, SpeechTimestamp speechTimestamp) throws IOException {
    writer.beginArray();

    writer.value(speechTimestamp.getWord());
    writer.value(speechTimestamp.getStartTime());
    writer.value(speechTimestamp.getEndTime());

    writer.endArray();
    writer.flush();
  }
694355
void write(ObjectOutputStream out) throws IOException {
        PutField fields = out.putFields();

        fields.put(CONTEXT, threadContextDescriptor.serialize());

        fields.put(EXEC_PROPS, threadContextDescriptor.getExecutionProperties());

        fields.put(INTERNAL_PROP_NAMES, internalPropNames);

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        ObjectOutputStream oout = new ObjectOutputStream(bout);
        oout.writeObject(object);
        oout.flush();
        fields.put(OBJECT, bout.toByteArray());
        oout.close();

        out.writeFields();
    }
914462
@Deprecated
   public void write(Model project, Document document, OutputStream stream) throws java.io.IOException
   {
      updateModel(project, "project", new Counter(0), document.getRootElement());

      XMLOutputter outputter = new XMLOutputter();
      outputter.setFormat(Format.getPrettyFormat().setIndent("  ").setLineSeparator(LS));
      outputter.output(document, stream);
   }
338356
@SuppressWarnings("unchecked")
	@Override
	public void publishEvent(ApplicationEvent event) {

		if (event instanceof MappingContextEvent) {
			this.schmeaCreator
					.onApplicationEvent((MappingContextEvent<SolrPersistentEntity<?>, SolrPersistentProperty>) event);
		}
	}
937357
private void write(IRTMPEvent event, Number streamId) {
        log.trace("write to stream id: {} channel: {}", streamId, id);
        final Header header = new Header();
        final Packet packet = new Packet(header, event);
        // set the channel id
        header.setChannelId(id);
        int ts = event.getTimestamp();
        if (ts != 0) {
            header.setTimer(event.getTimestamp());
        }
        header.setStreamId(streamId);
        header.setDataType(event.getDataType());
        // should use RTMPConnection specific method.. 
        //log.trace("Connection type for write: {}", connection.getClass().getName());
        connection.write(packet);
    }
603630
@Override
  public void write(Fields fields) throws IOException {
    delegateFieldsConsumer.write(fields);
    write(state.fieldInfos, fields);
  }
252154
protected void write(JsonWriter out, T value, TypeAdapter<JsonElement> elementAdapter, TypeAdapter<T> delegate) throws IOException {
        JsonElement tree = delegate.toJsonTree(value);
        beforeWrite(value, tree);
        elementAdapter.write(out, tree);
    }
465396
@Override
    public void writeText(PDDocument doc, Writer outputStream) throws IOException
    {
        try
        {
            DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
            DOMImplementationLS impl = (DOMImplementationLS)registry.getDOMImplementation("LS");
            LSSerializer writer = impl.createLSSerializer();
            LSOutput output = impl.createLSOutput();
            writer.getDomConfig().setParameter("format-pretty-print", true);
            output.setCharacterStream(outputStream);
            createDOM(doc);
            writer.write(getDocument(), output);
        } catch (ClassCastException e) {
            throw new IOException("Error: cannot initialize the DOM serializer", e);
        } catch (ClassNotFoundException e) {
            throw new IOException("Error: cannot initialize the DOM serializer", e);
        } catch (InstantiationException e) {
            throw new IOException("Error: cannot initialize the DOM serializer", e);
        } catch (IllegalAccessException e) {
            throw new IOException("Error: cannot initialize the DOM serializer", e);
        }
    }
577104
def write_events(stream, events):
    '''
    
    '''
    for event in events:
        data = event.SerializeToString()
        len_field = struct.pack('<Q', len(data))
        len_crc = struct.pack('<I', masked_crc(len_field))
        data_crc = struct.pack('<I', masked_crc(data))
        stream.write(len_field)
        stream.write(len_crc)
        stream.write(data)
        stream.write(data_crc)
508526
@Override
	public void writeTo(T t, CodedOutputStream out) throws IOException {
		for (FieldInfo fieldInfo : fieldInfos) {
			Object value = FieldUtils.getField(t, fieldInfo.getField());
			if (value != null) {
				writeTo(fieldInfo, value, out);
			}
		}

	}
19917
private void writeObject(java.io.ObjectOutputStream out) throws IOException
	{
		if (delegateMethods != null)
		{
			delegateMethods.clear();
		}

		out.defaultWriteObject();
	}
444301
public void publish(Object event) {
        Objects.requireNonNull(event, Required.EVENT.toString());
        
        this.eventBus.post(event);
        this.events.getAndIncrement();
    }
332954
@Override
  void write(ByteCodeWriter out)
    throws IOException
  {
    out.write(ConstantPool.CP_INVOKEDYNAMIC);
    out.writeShort(_bootstrapMethodAttrIndex);
    out.writeShort(_nameAndTypeIndex);
  }