Package io.keikai.doc.collab.utils
Class UpdateDecoderV2
java.lang.Object
io.keikai.doc.collab.utils.DSDecoderV2
io.keikai.doc.collab.utils.UpdateDecoderV2
- All Implemented Interfaces:
DSDecoder,UpdateDecoder
-
Field Summary
Fields inherited from class io.keikai.doc.collab.utils.DSDecoderV2
_restDecoder -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.keikai.doc.collab.utils.DSDecoderV2
getRestDecoder, readDsClock, readDsLen, resetDsCurValMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.keikai.doc.collab.utils.DSDecoder
getRestDecoder, readDsClock, readDsLen, resetDsCurVal
-
Constructor Details
-
UpdateDecoderV2
-
-
Method Details
-
readLeftID
- Specified by:
readLeftIDin interfaceUpdateDecoder- Returns:
- ID with the left client ID and clock
-
readRightID
- Specified by:
readRightIDin interfaceUpdateDecoder- Returns:
- ID with the right client ID and clock
-
readClient
public int readClient()Read 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:
- info An unsigned 8-bit integer
-
readString
- Specified by:
readStringin interfaceUpdateDecoder- Returns:
- the next string
-
readParentInfo
public boolean readParentInfo()- Specified by:
readParentInfoin interfaceUpdateDecoder- Returns:
- parent info as a boolean
-
readTypeRef
public int readTypeRef()- Specified by:
readTypeRefin interfaceUpdateDecoder- Returns:
- Type reference as 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:
- length of a struct, well suited for Opt RLE decoder
-
readAny
- Specified by:
readAnyin interfaceUpdateDecoder- Returns:
- the next "any" value
-
readBuf
- Specified by:
readBufin interfaceUpdateDecoder- Returns:
- the next byte array
-
readJSON
This is mainly here for legacy purposes. Initially, we encoded objects using JSON. Now we use the much faster lib0/any-encoder. This method mainly exists for legacy purposes for the v1 encoder.- Specified by:
readJSONin interfaceUpdateDecoder- Returns:
- the next JSON object
-
readKey
- Specified by:
readKeyin interfaceUpdateDecoder- Returns:
- the next key string
-