public class ProtobufTlv extends Object
| Constructor and Description |
|---|
ProtobufTlv() |
| Modifier and Type | Method and Description |
|---|---|
static void |
decode(com.google.protobuf.Message.Builder message,
Blob input) |
static void |
decode(com.google.protobuf.Message.Builder message,
ByteBuffer input)
Decode the input as NDN-TLV and update the fields of the Protobuf message
object.
|
static Blob |
encode(com.google.protobuf.Message message)
Encode the Protobuf message object as NDN-TLV.
|
static Name |
toName(com.google.protobuf.Message nameMessage)
Return a Name made from the component array in a Protobuf message object,
assuming that it was defined with "repeated bytes".
|
public static Blob encode(com.google.protobuf.Message message)
message - The Protobuf message object. This calls
message.IsInitialized() to ensure that all required fields are present and
throws an exception if not.public static void decode(com.google.protobuf.Message.Builder message,
ByteBuffer input)
throws EncodingException
message - The Protobuf Message builder object. This does not first
clear the object.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException - For invalid encoding.public static void decode(com.google.protobuf.Message.Builder message,
Blob input)
throws EncodingException
EncodingExceptionpublic static Name toName(com.google.protobuf.Message nameMessage)
nameMessage - The Protobuf message object containing the "repeated
bytes" component array.Copyright © 2019. All rights reserved.