public class Destination extends KeysAndCert
Destination represents the fundamental addressing and identity concept in I2P:
Key Components:
Address Formats:
Historical Changes:
Usage:
Security Considerations:
Performance Features:
Immutability:
IllegalStateExceptionMigration Notes:
_certificate, _paddingBlocks, _publicKey, _signingKey| Constructor and Description |
|---|
Destination()Empty destination with no data set. |
Destination(String s)alternative constructor which takes a base64 string representation |
| Modifier and Type | Method and Description |
|---|---|
static void | clearCache()Clear the cache. |
static Destination | create(InputStream in)Pull from cache or return new |
boolean | equals(Object o)equals. |
int | hashCode()Whether h code is present. |
int | size()Serialized size of this destination. |
String | toBase32()For convenience. |
String | toBase64()Cache it. |
int | writeBytes(byte[] target,
int offset)Deprecated, used only by Packet.java in streaming. |
calculateHash, combinePadding, getCertificate, getEncType, getHash, getPadding, getPublicKey, getSigningPublicKey, getSigType, isCompressible, readBytes, setCertificate, setPadding, setPublicKey, setSigningPublicKey, toString, writeBytes, writePaddingBytesfromBase64, fromByteArray, read, toByteArraypublic Destination()
public Destination(String s) throws DataFormatException
s - a Base64 representation of the destination, as (eg) is used in hosts.txtDataFormatException - if the string is invalidpublic static void clearCache()
public static Destination create(InputStream in) throws DataFormatException, IOException
in - the input streamDataFormatException - if data is invalidIOException - if an I/O error occurspublic boolean equals(Object o)
equals in class KeysAndCertpublic int hashCode()
hashCode in class KeysAndCertpublic int size()
public String toBase32()
public String toBase64()
toBase64 in interface DataStructuretoBase64 in class DataStructureImplpublic int writeBytes(byte[] target,
int offset)target - the targetoffset - the offset to start writing