net.named_data.jndn.encoding
public class Tlv0_1_1WireFormat extends WireFormat
ENABLE_NDNX| Constructor and Description |
|---|
Tlv0_1_1WireFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
decodeControlParameters(ControlParameters controlParameters,
ByteBuffer input)
Decode input as a control parameters in NDN-TLV and set the fields of the
controlParameters object.
|
void |
decodeData(Data data,
ByteBuffer input,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Decode input as a data packet in NDN-TLV and set the fields in the data
object.
|
void |
decodeInterest(Interest interest,
ByteBuffer input,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Decode input as an interest in NDN-TLV and set the fields of the interest
object.
|
void |
decodeLocalControlHeader(LocalControlHeader localControlHeader,
ByteBuffer input)
Decode input as a LocalControlHeader in NDN-TLV and set the fields of the
localControlHeader object.
|
void |
decodeName(Name name,
ByteBuffer input)
Decode input as a name in NDN-TLV and set the fields of the interest object.
|
Signature |
decodeSignatureInfoAndValue(ByteBuffer signatureInfo,
ByteBuffer signatureValue)
Decode signatureInfo as an NDN-TLV signature info and signatureValue as the
related NDN-TLV SignatureValue, and return a new object which is a subclass
of Signature.
|
Blob |
encodeControlParameters(ControlParameters controlParameters)
Encode controlParameters in NDN-TLV and return the encoding.
|
Blob |
encodeData(Data data,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Encode data in NDN-TLV and return the encoding.
|
Blob |
encodeInterest(Interest interest,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Encode interest using NDN-TLV and return the encoding.
|
Blob |
encodeLocalControlHeader(LocalControlHeader localControlHeader)
Encode the LocalControlHeader in NDN-TLV and return the encoding.
|
Blob |
encodeName(Name name)
Encode name in NDN-TLV and return the encoding.
|
Blob |
encodeSignatureInfo(Signature signature)
Encode signature as a SignatureInfo in NDN-TLV and return the encoding.
|
Blob |
encodeSignatureValue(Signature signature)
Encode the signatureValue in the Signature object as a SignatureValue (the
signature bits) in NDN-TLV and return the encoding.
|
static Tlv0_1_1WireFormat |
get()
Get a singleton instance of a Tlv1_0a2WireFormat.
|
decodeData, decodeForwardingEntry, decodeInterest, encodeData, encodeForwardingEntry, encodeInterest, getDefaultWireFormat, setDefaultWireFormatpublic Blob encodeName(Name name)
encodeName in class WireFormatname - The Name object to encode.public void decodeName(Name name, ByteBuffer input) throws EncodingException
decodeName in class WireFormatname - The Name object whose fields are updated.input - The input buffer to decode. This reads from position() to limit(), but does not change the position.EncodingException - For invalid encoding.public Blob encodeInterest(Interest interest, int[] signedPortionBeginOffset, int[] signedPortionEndOffset)
encodeInterest in class WireFormatinterest - The Interest object to encode.signedPortionBeginOffset - Return the offset in the encoding of the
beginning of the signed portion. The signed portion starts from the first
name component and ends just before the final name component (which is
assumed to be a signature for a signed interest).signedPortionEndOffset - Return the offset in the encoding of the end
of the signed portion. The signed portion starts from the first
name component and ends just before the final name component (which is
assumed to be a signature for a signed interest).public void decodeInterest(Interest interest, ByteBuffer input, int[] signedPortionBeginOffset, int[] signedPortionEndOffset) throws EncodingException
decodeInterest in class WireFormatinterest - The Interest object whose fields are updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.signedPortionBeginOffset - Return the offset in the encoding of the
beginning of the signed portion. The signed portion starts from the first
name component and ends just before the final name component (which is
assumed to be a signature for a signed interest).signedPortionEndOffset - Return the offset in the encoding of the end
of the signed portion. The signed portion starts from the first
name component and ends just before the final name component (which is
assumed to be a signature for a signed interest).EncodingException - For invalid encoding.public Blob encodeData(Data data, int[] signedPortionBeginOffset, int[] signedPortionEndOffset)
encodeData in class WireFormatdata - The Data object to encode.signedPortionBeginOffset - Return the offset in the encoding of the
beginning of the signed portion by setting signedPortionBeginOffset[0].
If you are not encoding in order to sign, you can call encodeData(data) to
ignore this returned value.signedPortionEndOffset - Return the offset in the encoding of the end
of the signed portion by setting signedPortionEndOffset[0].
If you are not encoding in order to sign, you can call encodeData(data) to
ignore this returned value.public void decodeData(Data data, ByteBuffer input, int[] signedPortionBeginOffset, int[] signedPortionEndOffset) throws EncodingException
decodeData in class WireFormatdata - The Data object whose fields are updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.signedPortionBeginOffset - Return the offset in the input buffer of
the beginning of the signed portion by setting signedPortionBeginOffset[0].
If you are not decoding in order to verify, you can call
decodeData(data, input) to ignore this returned value.signedPortionEndOffset - Return the offset in the input buffer of the
end of the signed portion by setting signedPortionEndOffset[0]. If you are
not decoding in order to verify, you can call decodeData(data, input) to
ignore this returned value.EncodingException - For invalid encoding.public Blob encodeControlParameters(ControlParameters controlParameters)
encodeControlParameters in class WireFormatcontrolParameters - The ControlParameters object to encode.public void decodeControlParameters(ControlParameters controlParameters, ByteBuffer input) throws EncodingException
decodeControlParameters in class WireFormatcontrolParameters - The ControlParameters object whose fields are
updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException - For invalid encodingpublic Blob encodeSignatureInfo(Signature signature)
encodeSignatureInfo in class WireFormatsignature - An object of a subclass of Signature to encode.public Signature decodeSignatureInfoAndValue(ByteBuffer signatureInfo, ByteBuffer signatureValue) throws EncodingException
decodeSignatureInfoAndValue in class WireFormatsignatureInfo - The signature info input buffer to decode. This reads
from position() to limit(), but does not change the position.signatureValue - The signature value input buffer to decode. This reads
from position() to limit(), but does not change the position.EncodingException - For invalid encoding.public Blob encodeSignatureValue(Signature signature)
encodeSignatureValue in class WireFormatsignature - An object of a subclass of Signature with the signature
value to encode.public Blob encodeLocalControlHeader(LocalControlHeader localControlHeader)
encodeLocalControlHeader in class WireFormatlocalControlHeader - The LocalControlHeader object to encode.public void decodeLocalControlHeader(LocalControlHeader localControlHeader, ByteBuffer input) throws EncodingException
decodeLocalControlHeader in class WireFormatlocalControlHeader - The LocalControlHeader object whose fields are
updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException - For invalid encodingpublic static Tlv0_1_1WireFormat get()
Copyright © 2015. All rights reserved.