public class Data extends Object implements ChangeCountable, SignatureHolder
| Constructor and Description |
|---|
Data()
Create a new Data object with default values and where the signature is a
blank Sha256WithRsaSignature.
|
Data(Data data)
Create a deep copy of the given data object, including a clone of the
signature object.
|
Data(Name name)
Create a new Data object with the given name and default values and where
the signature is a blank Sha256WithRsaSignature.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getChangeCount()
Get the change count, which is incremented each time this object
(or a child object) is changed.
|
long |
getCongestionMark()
Get the congestion mark according to the incoming packet header.
|
Blob |
getContent() |
SignedBlob |
getDefaultWireEncoding()
Return a pointer to the defaultWireEncoding, which was encoded with
getDefaultWireEncodingFormat().
|
Name |
getFullName()
Get the Data packet's full name, which includes the final
ImplicitSha256Digest component based on the wire encoding for the default
wire format.
|
Name |
getFullName(WireFormat wireFormat)
Get the Data packet's full name, which includes the final
ImplicitSha256Digest component based on the wire encoding for a particular
wire format.
|
long |
getIncomingFaceId()
Get the incoming face ID according to the incoming packet header.
|
MetaInfo |
getMetaInfo() |
Name |
getName() |
Signature |
getSignature() |
Data |
setContent(Blob content) |
Data |
setLpPacket(LpPacket lpPacket)
An internal library method to set the LpPacket for an incoming packet.
|
Data |
setMetaInfo(MetaInfo metaInfo)
Set metaInfo to a copy of the given MetaInfo.
|
Data |
setName(Name name)
Set name to a copy of the given Name.
|
Data |
setSignature(Signature signature)
Set the signature to a copy of the given signature.
|
void |
wireDecode(Blob input)
Decode the input using the default wire format
WireFormat.getDefaultWireFormat() and update this Data.
|
void |
wireDecode(Blob input,
WireFormat wireFormat)
Decode the input using a particular wire format and update this Data.
|
void |
wireDecode(ByteBuffer input)
Decode the input using the default wire format
WireFormat.getDefaultWireFormat() and update this Data.
|
void |
wireDecode(ByteBuffer input,
WireFormat wireFormat)
Decode the input using a particular wire format and update this Data.
|
SignedBlob |
wireEncode()
Encode this Data for the default wire format WireFormat.getDefaultWireFormat().
|
SignedBlob |
wireEncode(WireFormat wireFormat)
Encode this Data for a particular wire format.
|
public Data()
public Data(Name name)
name - The name which is copied.public Data(Data data)
data - The data object to copy.public final SignedBlob wireEncode(WireFormat wireFormat)
wireFormat - A WireFormat object used to encode the input.public final SignedBlob wireEncode()
public void wireDecode(Blob input, WireFormat wireFormat) throws EncodingException
input - The input Blob to decode. This reads from buf().position() to
buf().limit(), but does not change the position.wireFormat - A WireFormat object used to decode the input.EncodingException - For invalid encoding.public final void wireDecode(Blob input) throws EncodingException
input - The input Blob to decode. This reads from buf().position() to
buf().limit(), but does not change the position.EncodingException - For invalid encoding.public final void wireDecode(ByteBuffer input, WireFormat wireFormat) throws EncodingException
input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.wireFormat - A WireFormat object used to decode the input.EncodingException - For invalid encoding.public final void wireDecode(ByteBuffer input) throws EncodingException
input - The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException - For invalid encoding.public final Signature getSignature()
getSignature in interface SignatureHolderpublic final Name getName()
public final MetaInfo getMetaInfo()
public final Blob getContent()
public final long getIncomingFaceId()
public final long getCongestionMark()
public final Name getFullName(WireFormat wireFormat)
wireFormat - A WireFormat object used to encode the Data packet.public final Name getFullName() throws EncodingException
EncodingExceptionpublic final SignedBlob getDefaultWireEncoding()
public final Data setSignature(Signature signature)
setSignature in interface SignatureHoldersignature - The signature object which is cloned.public Data setName(Name name)
name - The Name which is copied.public final Data setMetaInfo(MetaInfo metaInfo)
metaInfo - The MetaInfo which is copied.public final Data setLpPacket(LpPacket lpPacket)
lpPacket - The LpPacket. This does not make a copy.public final long getChangeCount()
getChangeCount in interface ChangeCountableCopyright © 2019. All rights reserved.