Class DisconnectMessage.DisconnectSerializer

java.lang.Object
com.jme3.network.serializing.Serializer
com.jme3.network.message.DisconnectMessage.DisconnectSerializer
Enclosing class:
DisconnectMessage

public static class DisconnectMessage.DisconnectSerializer extends Serializer
A message-specific serializer to avoid compatibility issues between versions. This serializer is registered to the specific SERIALIZER_ID which is compatible with previous versions of the SM serializer registrations... and now will be forever.
Author:
Lars Wesselius, Paul Speed
  • Constructor Details

    • DisconnectSerializer

      public DisconnectSerializer()
      Creates the serializer used for disconnect messages.
  • Method Details

    • readObject

      public <T> T readObject(ByteBuffer data, Class<T> c) throws IOException
      Description copied from class: Serializer
      Read an object from the buffer, effectively deserializing it.
      Specified by:
      readObject in class Serializer
      Type Parameters:
      T - The object type expected from the serializer.
      Parameters:
      data - The buffer to read from.
      c - The class of the object.
      Returns:
      The object read.
      Throws:
      IOException - If deserializing fails.
    • writeObject

      public void writeObject(ByteBuffer buffer, Object object) throws IOException
      Description copied from class: Serializer
      Write an object to the buffer, effectively serializing it.
      Specified by:
      writeObject in class Serializer
      Parameters:
      buffer - The buffer to write to.
      object - The object to serialize.
      Throws:
      IOException - If serializing fails.