pt.unl.fct.di.novasys.babel.crdts.utils

Class Utils



  • public class Utils
    extends Object
    A set of utils to be used by the different classes in the library.
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • encodeUTF8

        public static void encodeUTF8(String str,
                                      io.netty.buffer.ByteBuf out)
        Encodes a string as a UTF8 charset into a ByteBuf.
        Parameters:
        str - string to be encoded.
        out - ByteBuf where the string is encoded.
      • decodeUTF8

        public static String decodeUTF8(io.netty.buffer.ByteBuf in)
        Decodes a string from a ByteBuf as a UTF8 charset.
        Parameters:
        in - ByteBuf where the string was written.
        Returns:
        a string representing the information written in the ByteBuf.

Copyright © 2024. All rights reserved.