public class Data extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static PublicKey |
FROM_MESSAGE |
| Constructor and Description |
|---|
Data(byte[] data) |
Data(byte[] data,
int offset,
int length,
PeerAddress originator) |
Data(byte[] data,
PeerAddress originator) |
Data(Object object) |
Data(Object object,
PeerAddress originator) |
| Modifier and Type | Method and Description |
|---|---|
long |
getCreated() |
byte[] |
getData() |
PublicKey |
getDataPublicKey()
This public key is set by the storage class and not by the decoding class
|
long |
getExpirationMillis() |
Number160 |
getHash() |
int |
getLength() |
Object |
getObject() |
int |
getOffset() |
PeerAddress |
getPeerAddress() |
byte[] |
getSignature() |
int |
getTTLSeconds() |
boolean |
isDirectReplication() |
boolean |
isProtectedEntry() |
void |
setDataPublicKey(PublicKey dataPublicKey)
This public key is set by the storage class and not by the decoding class
|
void |
setDirectReplication(boolean directReplication) |
void |
setPeerAddress(PeerAddress originator) |
void |
setProtectedEntry(boolean protectedEntry) |
void |
setSignature(byte[] signature) |
void |
setTTLSeconds(int ttlSeconds) |
void |
signAndSetPublicKey(KeyPair keyPair) |
String |
toString() |
boolean |
verify(PublicKey public1) |
public static final PublicKey FROM_MESSAGE
public Data(Object object) throws IOException
IOExceptionpublic Data(Object object, PeerAddress originator) throws IOException
IOExceptionpublic Data(byte[] data)
public Data(byte[] data,
PeerAddress originator)
public Data(byte[] data,
int offset,
int length,
PeerAddress originator)
public byte[] getData()
public Object getObject() throws ClassNotFoundException, IOException
ClassNotFoundExceptionIOExceptionpublic long getCreated()
public int getTTLSeconds()
public void setTTLSeconds(int ttlSeconds)
public Number160 getHash()
public int getOffset()
public int getLength()
public long getExpirationMillis()
public PublicKey getDataPublicKey()
public void setDataPublicKey(PublicKey dataPublicKey)
publicKey - public void signAndSetPublicKey(KeyPair keyPair) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException
public boolean verify(PublicKey public1) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException
public void setSignature(byte[] signature)
public byte[] getSignature()
public boolean isProtectedEntry()
public void setProtectedEntry(boolean protectedEntry)
public void setDirectReplication(boolean directReplication)
public boolean isDirectReplication()
public PeerAddress getPeerAddress()
public void setPeerAddress(PeerAddress originator)
Copyright © 2011. All Rights Reserved.