net.named_data.jndn.encoding
public class BinaryXmlWireFormat extends WireFormat
ENABLE_NDNX| Constructor and Description |
|---|
BinaryXmlWireFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
decodeData(Data data,
ByteBuffer input,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Decode input as a data packet in binary XML and set the fields in the data object.
|
void |
decodeForwardingEntry(ForwardingEntry forwardingEntry,
ByteBuffer input)
Decode input as a forwarding entry in binary XML and set the fields of the
forwardingEntry object.
|
void |
decodeInterest(Interest interest,
ByteBuffer input,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Decode input as an interest in binary XML and set the fields of the interest object.
|
void |
decodeName(Name name,
ByteBuffer input)
Decode input as a name in binary XML and set the fields of the interest object.
|
Blob |
encodeData(Data data,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Encode data and return the encoding.
|
Blob |
encodeForwardingEntry(ForwardingEntry forwardingEntry)
Encode forwardingEntry in binary XML and return the encoding.
|
Blob |
encodeInterest(Interest interest,
int[] signedPortionBeginOffset,
int[] signedPortionEndOffset)
Encode interest in binary XML and return the encoding.
|
Blob |
encodeName(Name name)
Encode name in binary XML and return the encoding.
|
static BinaryXmlWireFormat |
get()
Get a singleton instance of a BinaryXmlWireFormat.
|
decodeControlParameters, decodeData, decodeInterest, decodeLocalControlHeader, decodeSignatureInfoAndValue, encodeControlParameters, encodeData, encodeInterest, encodeLocalControlHeader, encodeSignatureInfo, encodeSignatureValue, 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 encodeForwardingEntry(ForwardingEntry forwardingEntry)
encodeForwardingEntry in class WireFormatforwardingEntry - The ForwardingEntry object to encode.public void decodeForwardingEntry(ForwardingEntry forwardingEntry, ByteBuffer input) throws EncodingException
decodeForwardingEntry in class WireFormatforwardingEntry - The ForwardingEntry object whose fields are updated.input - ByteBuffer input.EncodingException - For invalid encoding.public static BinaryXmlWireFormat get()
Copyright © 2015. All rights reserved.