|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.DataStructureImpl
net.i2p.data.Destination
public class Destination
Defines an end point in the I2P network. The Destination may move aroundn in the network, but messages sent to the Destination will find it
Constructor Summary | |
---|---|
Destination()
|
|
Destination(java.lang.String s)
alternative constructor which takes a base64 string representation |
Method Summary | |
---|---|
Hash |
calculateHash()
Calculate the SHA256 value of this object (useful for a few scenarios) |
boolean |
equals(java.lang.Object object)
|
Certificate |
getCertificate()
|
PublicKey |
getPublicKey()
|
SigningPublicKey |
getSigningPublicKey()
|
int |
hashCode()
|
static void |
main(java.lang.String[] args)
|
int |
readBytes(byte[] source,
int offset)
|
void |
readBytes(java.io.InputStream in)
Load up the current object with data from the given stream. |
void |
setCertificate(Certificate cert)
|
void |
setPublicKey(PublicKey key)
|
void |
setSigningPublicKey(SigningPublicKey key)
|
int |
size()
|
java.lang.String |
toString()
|
int |
writeBytes(byte[] target,
int offset)
|
void |
writeBytes(java.io.OutputStream out)
Write out the data structure to the stream, using the format defined in the I2P data structure specification. |
Methods inherited from class net.i2p.data.DataStructureImpl |
---|
fromBase64, fromByteArray, read, toBase64, toByteArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Destination()
public Destination(java.lang.String s) throws DataFormatException
s
- a Base64 representation of the destination, as (eg) is used in hosts.txt
DataFormatException
Method Detail |
---|
public Certificate getCertificate()
public void setCertificate(Certificate cert)
public PublicKey getPublicKey()
public void setPublicKey(PublicKey key)
public SigningPublicKey getSigningPublicKey()
public void setSigningPublicKey(SigningPublicKey key)
public void readBytes(java.io.InputStream in) throws DataFormatException, java.io.IOException
DataStructure
in
- stream to read from
DataFormatException
- if the data is improperly formatted
java.io.IOException
- if there was a problem reading the streampublic void writeBytes(java.io.OutputStream out) throws DataFormatException, java.io.IOException
DataStructure
out
- stream to write to
DataFormatException
- if the data was incomplete or not yet ready to be written
java.io.IOException
- if there was a problem writing to the streampublic int writeBytes(byte[] target, int offset)
public int readBytes(byte[] source, int offset) throws DataFormatException
DataFormatException
public int size()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Hash calculateHash()
DataStructure
calculateHash
in interface DataStructure
calculateHash
in class DataStructureImpl
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |