Class ProtoIds


  • public final class ProtoIds
    extends java.lang.Object
    Deals with proto buffer based ID serialization and parsing.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <M extends com.google.protobuf.Message>
      M
      parse​(java.lang.String value, com.google.protobuf.Message.Builder blank)
      Parses out a message previously serialized with the serialize.
      static java.lang.String serialize​(byte[] bytes)
      Serializes the specified byte array into a string.
      static java.lang.String serialize​(com.google.protobuf.Message message)
      Serializes the specified protobuf into a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • serialize

        public static java.lang.String serialize​(com.google.protobuf.Message message)
        Serializes the specified protobuf into a string.
        Parameters:
        message - message to serialize
        Returns:
        message serialized as a string
      • serialize

        public static java.lang.String serialize​(byte[] bytes)
        Serializes the specified byte array into a string.
        Parameters:
        bytes - byte array to serialize
        Returns:
        message serialized as a string
      • parse

        @Nullable
        public static <M extends com.google.protobuf.Message> M parse​(java.lang.String value,
                                                                      com.google.protobuf.Message.Builder blank)
        Parses out a message previously serialized with the serialize.
        Type Parameters:
        M - message type
        Parameters:
        value - serialized value
        blank - blank message used to parse the value into
        Returns:
        parsed message if successful