Package io.keikai.doc.collab.utils
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
-
-
Field Summary
-
Fields inherited from class io.keikai.doc.collab.utils.DSDecoderV1
_restDecoder
-
-
Constructor Summary
Constructors Constructor Description UpdateDecoderV1(Decoder decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectreadAny()Uint8ArrayreadBuf()intreadClient()Read the next client id.intreadInfo()java.lang.ObjectreadJSON()Legacy implementation uses JSON parse.java.lang.StringreadKey()IDreadLeftID()intreadLen()Write len of a struct - well suited for Opt RLE encoder.booleanreadParentInfo()IDreadRightID()java.lang.StringreadString()intreadTypeRef()-
Methods inherited from class io.keikai.doc.collab.utils.DSDecoderV1
getRestDecoder, readDsClock, readDsLen, resetDsCurVal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.keikai.doc.collab.utils.DSDecoder
getRestDecoder, readDsClock, readDsLen, resetDsCurVal
-
-
-
-
Constructor Detail
-
UpdateDecoderV1
public UpdateDecoderV1(Decoder decoder)
- Parameters:
decoder-
-
-
Method Detail
-
readLeftID
public ID readLeftID()
- Specified by:
readLeftIDin interfaceUpdateDecoder- Returns:
- {ID}
-
readRightID
public ID readRightID()
- Specified by:
readRightIDin interfaceUpdateDecoder- Returns:
- {ID}
-
readClient
public int readClient()
Description copied from interface:UpdateDecoderRead the next client id. Use this in favor of readID whenever possible to reduce the number of objects created.- Specified by:
readClientin interfaceUpdateDecoder
-
readInfo
public int readInfo()
- Specified by:
readInfoin interfaceUpdateDecoder- Returns:
- {number} info An unsigned 8-bit integer
-
readString
public java.lang.String readString()
- Specified by:
readStringin interfaceUpdateDecoder- Returns:
- {string}
-
readParentInfo
public boolean readParentInfo()
- Specified by:
readParentInfoin interfaceUpdateDecoder- Returns:
- {boolean} isKey
-
readTypeRef
public int readTypeRef()
- Specified by:
readTypeRefin interfaceUpdateDecoder- Returns:
- {number} info An unsigned 8-bit integer
-
readLen
public int readLen()
Description copied from interface:UpdateDecoderWrite len of a struct - well suited for Opt RLE encoder.- Specified by:
readLenin interfaceUpdateDecoder- Returns:
- {number} len
-
readAny
public java.lang.Object readAny()
- Specified by:
readAnyin interfaceUpdateDecoder- Returns:
- {any}
-
readBuf
public Uint8Array readBuf()
- Specified by:
readBufin interfaceUpdateDecoder- Returns:
- {Uint8Array}
-
readJSON
public java.lang.Object readJSON()
Description copied from interface:UpdateDecoderLegacy implementation uses JSON parse. We use any-Decoding in v2.- Specified by:
readJSONin interfaceUpdateDecoder- Returns:
- {any}
-
readKey
public java.lang.String readKey()
- Specified by:
readKeyin interfaceUpdateDecoder- Returns:
- {string}
-
-