Interface BinaryWriter

  • All Known Implementing Classes:
    Any, Empty, PApplicationException

    public interface BinaryWriter
    Interface for messages that can directly be written to binary.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int writeBinary​(net.morimekta.util.io.BigEndianBinaryWriter writer)
      Write the current message to the binary writer.
    • Method Detail

      • writeBinary

        int writeBinary​(net.morimekta.util.io.BigEndianBinaryWriter writer)
                 throws java.io.IOException
        Write the current message to the binary writer. NOTE: This method is not intended to be used directly. Instead use the BinarySerializer.serialize(OutputStream, PMessage) call.
        Parameters:
        writer - The binary writer to write to.
        Returns:
        The number of bytes written.
        Throws:
        java.io.IOException - If it failed to write the message for any reason.