Package io.token.proto
Class ProtoIds
- java.lang.Object
-
- io.token.proto.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>
Mparse(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.
-
-
-
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 valueblank
- blank message used to parse the value into- Returns:
- parsed message if successful
-
-