Class RTCDataChannelBuffer

java.lang.Object
dev.onvoid.webrtc.RTCDataChannelBuffer

public class RTCDataChannelBuffer
extends java.lang.Object
A NIO based buffer used to send data over an RTCDataChannel.
Author:
Alex Andres
  • Field Summary

    Fields 
    Modifier and Type Field Description
    boolean binary
    Indicates whether the data contains UTF-8 text or binary data.
    java.nio.ByteBuffer data
    The underlying data.
  • Constructor Summary

    Constructors 
    Constructor Description
    RTCDataChannelBuffer​(java.nio.ByteBuffer data, boolean binary)
    Creates an instance of RTCDataChannelBuffer with the specified payload and indicator what kind of data the payload contains.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • data

      public final java.nio.ByteBuffer data
      The underlying data.
    • binary

      public final boolean binary
      Indicates whether the data contains UTF-8 text or binary data.
  • Constructor Details

    • RTCDataChannelBuffer

      public RTCDataChannelBuffer​(java.nio.ByteBuffer data, boolean binary)
      Creates an instance of RTCDataChannelBuffer with the specified payload and indicator what kind of data the payload contains.
      Parameters:
      data - The byte buffer containing the data to send.
      binary - Whether the buffer contains UTF-8 text or binary data.