net.named_data.jndn
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.
|
Blob |
getContent() |
SignedBlob |
getDefaultWireEncoding()
Return a pointer to the defaultWireEncoding, which was encoded with
getDefaultWireEncodingFormat().
|
long |
getIncomingFaceId()
Get the incoming face ID according to the incoming packet header.
|
MetaInfo |
getMetaInfo() |
Name |
getName() |
Signature |
getSignature() |
Data |
setContent(Blob content) |
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 decode 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 SignatureHolder
public final Name getName()
public final MetaInfo getMetaInfo()
public final Blob getContent()
public final long getIncomingFaceId()
public final SignedBlob getDefaultWireEncoding()
public final Data setSignature(Signature signature)
setSignature
in interface SignatureHolder
signature
- 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 long getChangeCount()
getChangeCount
in interface ChangeCountable
Copyright © 2016. All rights reserved.