Signature
Section titled “Signature”public interface LiveMapperHelperMethods
Section titled “Methods”bytesToProtoBufferStructure
Section titled “bytesToProtoBufferStructure”ProtoBufferObject bytesToProtoBufferStructure(byte[] bytes)See also: ProtoBufferObject
Parameters
Section titled “Parameters”bytes(byte[]) — protocol buffer data bytes
Returns
Section titled “Returns”ProtoBufferObject — tree structure of protocol buffer object
bytesToWebcastObject
Section titled “bytesToWebcastObject”<T extends GeneratedMessage> T bytesToWebcastObject(byte[] bytes, Class<T> messageClass)Parameters
Section titled “Parameters”bytes(byte[]) — protocol buffer data bytesmessageClass(Class<T>) — class that we want to serialize bytes to
Returns
Section titled “Returns”T — object of type @messageClass
bytesToWebcastObject
Section titled “bytesToWebcastObject”Object bytesToWebcastObject(byte[] bytes, String messageName)Parameters
Section titled “Parameters”bytes(byte[]) — protocol buffer data bytesmessageName(String) — class that we want to serialize bytes to
Returns
Section titled “Returns”Object — protocol buffer objects if class for @messageName has been found
Throws
Section titled “Throws”TikTokMessageMappingException— if there is no suitable class for messageName
isMessageHasProtoClass
Section titled “isMessageHasProtoClass”boolean isMessageHasProtoClass(String messageName)Parameters
Section titled “Parameters”messageName(String) — checks wheaten TikTokLiveJava has class representation for certain protocol-buffer message name
Returns
Section titled “Returns”boolean — false if class is not found
toJson
Section titled “toJson”String toJson(Object obj)Converts object to json
Parameters
Section titled “Parameters”obj(Object) — any object
Returns
Section titled “Returns”String — pretty formatted json
Source
Section titled “Source”API/src/main/java/io/github/jwdeveloper/tiktok/api/mappers/LiveMapperHelper.java:29