Class UpdateDecoderV1

java.lang.Object
io.keikai.doc.collab.utils.DSDecoderV1
io.keikai.doc.collab.utils.UpdateDecoderV1
All Implemented Interfaces:
DSDecoder, UpdateDecoder

public class UpdateDecoderV1 extends DSDecoderV1 implements UpdateDecoder
  • Constructor Details

    • UpdateDecoderV1

      public UpdateDecoderV1(Decoder decoder)
      Parameters:
      decoder -
  • Method Details

    • readLeftID

      public ID readLeftID()
      Specified by:
      readLeftID in interface UpdateDecoder
      Returns:
      {ID}
    • readRightID

      public ID readRightID()
      Specified by:
      readRightID in interface UpdateDecoder
      Returns:
      {ID}
    • readClient

      public int readClient()
      Description copied from interface: UpdateDecoder
      Read the next client id. Use this in favor of readID whenever possible to reduce the number of objects created.
      Specified by:
      readClient in interface UpdateDecoder
    • readInfo

      public int readInfo()
      Specified by:
      readInfo in interface UpdateDecoder
      Returns:
      {number} info An unsigned 8-bit integer
    • readString

      public String readString()
      Specified by:
      readString in interface UpdateDecoder
      Returns:
      {string}
    • readParentInfo

      public boolean readParentInfo()
      Specified by:
      readParentInfo in interface UpdateDecoder
      Returns:
      {boolean} isKey
    • readTypeRef

      public int readTypeRef()
      Specified by:
      readTypeRef in interface UpdateDecoder
      Returns:
      {number} info An unsigned 8-bit integer
    • readLen

      public int readLen()
      Description copied from interface: UpdateDecoder
      Write len of a struct - well suited for Opt RLE encoder.
      Specified by:
      readLen in interface UpdateDecoder
      Returns:
      {number} len
    • readAny

      public Object readAny()
      Specified by:
      readAny in interface UpdateDecoder
      Returns:
      {any}
    • readBuf

      public Uint8Array readBuf()
      Specified by:
      readBuf in interface UpdateDecoder
      Returns:
      {Uint8Array}
    • readJSON

      public Object readJSON()
      Description copied from interface: UpdateDecoder
      Legacy implementation uses JSON parse. We use any-Decoding in v2.
      Specified by:
      readJSON in interface UpdateDecoder
      Returns:
      {any}
    • readKey

      public String readKey()
      Specified by:
      readKey in interface UpdateDecoder
      Returns:
      {string}