net.named_data.jndn.encoding
public class Tlv0_2WireFormat extends WireFormat
| Constructor and Description |
|---|
Tlv0_2WireFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
decodeControlParameters(ControlParameters controlParameters,
ByteBuffer input,
boolean copy)
Decode input as a control parameters in NDN-TLV and set the fields of the
controlParameters object.
|
void |
decodeControlResponse(ControlResponse controlResponse,
ByteBuffer input,
boolean copy)
Decode input as a control parameters in NDN-TLV and set the fields of the
controlResponse object.
|
void |
decodeData(Data data,
ByteBuffer input,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset,
boolean copy)
Decode input as a data packet in NDN-TLV and set the fields in the data
object.
|
void |
decodeDelegationSet(DelegationSet delegationSet,
ByteBuffer input,
boolean copy)
Decode input as a sequence of NDN-TLV Delegation and set the fields of the
delegationSet object.
|
void |
decodeEncryptedContent(EncryptedContent encryptedContent,
ByteBuffer input,
boolean copy)
Decode input as a EncryptedContent in NDN-TLV and set the fields of the
encryptedContent object.
|
void |
decodeInterest(Interest interest,
ByteBuffer input,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset,
boolean copy)
Decode input as an interest in NDN-TLV and set the fields of the interest
object.
|
void |
decodeLpPacket(LpPacket lpPacket,
ByteBuffer input,
boolean copy)
Decode input as an NDN-TLV LpPacket and set the fields of the lpPacket object.
|
void |
decodeName(Name name,
ByteBuffer input,
boolean copy)
Decode input as a name in NDN-TLV and set the fields of the Name object.
|
Signature |
decodeSignatureInfoAndValue(ByteBuffer signatureInfo,
ByteBuffer signatureValue,
boolean copy)
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 |
encodeControlResponse(ControlResponse controlResponse)
Encode controlResponse 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 |
encodeDelegationSet(DelegationSet delegationSet)
Encode delegationSet as a sequence of NDN-TLV Delegation, and return the
encoding.
|
Blob |
encodeEncryptedContent(EncryptedContent encryptedContent)
Encode the EncryptedContent 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 |
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_2WireFormat |
get()
Get a singleton instance of a Tlv0_2WireFormat.
|
decodeControlParameters, decodeControlResponse, decodeData, decodeData, decodeData, decodeDelegationSet, decodeEncryptedContent, decodeInterest, decodeInterest, decodeInterest, decodeLpPacket, decodeName, decodeSignatureInfoAndValue, encodeData, encodeInterest, getDefaultWireFormat, setDefaultWireFormatpublic Blob encodeName(Name name)
encodeName in class WireFormatname - The Name object to encode.public void decodeName(Name name, ByteBuffer input, boolean copy) 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.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.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, boolean copy) 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).copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.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, boolean copy) 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.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.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, boolean copy) 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.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.EncodingException - For invalid encodingpublic Blob encodeControlResponse(ControlResponse controlResponse)
encodeControlResponse in class WireFormatcontrolResponse - The ControlResponse object to encode.public void decodeControlResponse(ControlResponse controlResponse, ByteBuffer input, boolean copy) throws EncodingException
decodeControlResponse in class WireFormatcontrolResponse - The ControlResponse object whose fields are
updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.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, boolean copy) 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.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.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 void decodeLpPacket(LpPacket lpPacket, ByteBuffer input, boolean copy) throws EncodingException
decodeLpPacket in class WireFormatlpPacket - The LpPacket object whose fields are updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.EncodingException - For invalid encoding.public Blob encodeDelegationSet(DelegationSet delegationSet)
encodeDelegationSet in class WireFormatdelegationSet - The DelegationSet object to encode.public void decodeDelegationSet(DelegationSet delegationSet, ByteBuffer input, boolean copy) throws EncodingException
decodeDelegationSet in class WireFormatdelegationSet - The DelegationSet object whose fields are updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.EncodingException - For invalid encoding.public Blob encodeEncryptedContent(EncryptedContent encryptedContent)
encodeEncryptedContent in class WireFormatencryptedContent - The EncryptedContent object to encode.public void decodeEncryptedContent(EncryptedContent encryptedContent, ByteBuffer input, boolean copy) throws EncodingException
decodeEncryptedContent in class WireFormatencryptedContent - The EncryptedContent object whose fields are
updated.input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.copy - If true, copy from the input when making new Blob values. If
false, then Blob values share memory with the input, which must remain
unchanged while the Blob values are used.EncodingException - For invalid encodingpublic static Tlv0_2WireFormat get()
Copyright © 2016. All rights reserved.