net.named_data.jndn.encoding
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.
|
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
EncodingException
Copyright © 2016. All rights reserved.