java.lang.Object
dev.kosmx.playerAnim.core.data.opennbs.network.NBSPacket

public class NBSPacket extends Object
  • Constructor Details

    • NBSPacket

      public NBSPacket(NBS song)
    • NBSPacket

      public NBSPacket()
  • Method Details

    • getSong

      public NBS getSong()
    • write

      public void write(ByteBuffer buf)
    • writeLayersAndNotes

      public void writeLayersAndNotes(ByteBuffer buf)
    • read

      public boolean read(ByteBuffer buf) throws IOException
      Parameters:
      buf - input ByteBuf
      Returns:
      true if reading was success
      Throws:
      IOException
    • calculateMessageSize

      public static int calculateMessageSize(NBS song)
      Warning! Works incorrectly when sending extra data
      Parameters:
      song - song to send
      Returns:
      estimated size
    • getLayerMessageSize

      public static int getLayerMessageSize(Layer layer)