Package net.i2p.data
Class MetaLeaseSet
java.lang.Object
net.i2p.data.DataStructureImpl
net.i2p.data.DatabaseEntry
net.i2p.data.LeaseSet
net.i2p.data.LeaseSet2
net.i2p.data.MetaLeaseSet
- All Implemented Interfaces:
Serializable,DataStructure
PRELIMINARY - Subject to change - see proposal 123
- Since:
- 0.9.38
- See Also:
-
Field Summary
Fields inherited from class net.i2p.data.LeaseSet2
_expires, _flags, _offlineSignature, _options, _published, _transientExpires, _transientSigningPublicKeyFields inherited from class net.i2p.data.LeaseSet
_byteified, _checked, _destination, _encryptionKey, _lastExpiration, _leases, _receivedAsPublished, _signingKey, MAX_LEASESFields inherited from class net.i2p.data.DatabaseEntry
_signature, KEY_TYPE_ENCRYPTED_LS2, KEY_TYPE_LEASESET, KEY_TYPE_LS2, KEY_TYPE_META_LS2, KEY_TYPE_ROUTERINFO, KEY_TYPE_SERVICE_LIST, KEY_TYPE_SERVICE_RECORD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an encryption key.voidbooleanintgetType()Get the type of the data structure.inthashCode()the destination has enough randomness in it to use it by itself for speedvoidreadBytes(InputStream in) This does NOT validate the signaturevoidintsize()Number of bytes, NOT including signaturetoString()protected voidWithout sig.Methods inherited from class net.i2p.data.LeaseSet2
encrypt, getBlindedHash, getBytes, getEncryptionKey, getEncryptionKey, getEncryptionKeys, getExpires, getOption, getPublished, getReceivedAsPublished, getTransientExpiration, getTransientSigningKey, isBlindedWhenPublished, isCurrent, isOffline, isUnpublished, offlineSign, readHeader, readOfflineBytes, setBlindedHash, setBlindedWhenPublished, setOfflineSignature, setOptions, setSigningKey, setUnpublished, sign, verifyOfflineSignature, verifyOfflineSignature, verifySignature, writeBody, writeBytes, writeHeader, writeOfflineBytesMethods inherited from class net.i2p.data.LeaseSet
getDate, getDestination, getEarliestLeaseDate, getKeysAndCert, getLatestLeaseDate, getLease, getLeaseCount, getReceivedAsReply, getReceivedBy, getSigningKey, setDestination, setReceivedAsPublished, setReceivedAsReply, setReceivedBy, verifySignatureMethods inherited from class net.i2p.data.DatabaseEntry
getHash, getRoutingKey, getSignature, getSigningPublicKey, isLeaseSet, isLeaseSet, setSignature, validateRoutingKeyMethods inherited from class net.i2p.data.DataStructureImpl
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray
-
Constructor Details
-
MetaLeaseSet
public MetaLeaseSet()
-
-
Method Details
-
getType
public int getType()Description copied from class:DatabaseEntryGet the type of the data structure. This should be faster than instanceof. -
setEncryptionKey
- Overrides:
setEncryptionKeyin classLeaseSet- Throws:
UnsupportedOperationException- always
-
addEncryptionKey
Description copied from class:LeaseSet2Add an encryption key. Encryption keys should be added in order of server preference, most-preferred first.- Overrides:
addEncryptionKeyin classLeaseSet2- Throws:
UnsupportedOperationException- always
-
readBytes
This does NOT validate the signature- Specified by:
readBytesin interfaceDataStructure- Overrides:
readBytesin classLeaseSet2- Parameters:
in- stream to read from- Throws:
IllegalStateException- if called more than once or Destination already setDataFormatException- if the data is improperly formattedIOException- if there was a problem reading the stream
-
writeBytesWithoutSig
Without sig. This does NOT validate the signature- Overrides:
writeBytesWithoutSigin classLeaseSet2- Throws:
DataFormatExceptionIOException
-
size
public int size()Number of bytes, NOT including signature -
addLease
- Overrides:
addLeasein classLeaseSet2- Parameters:
lease- must be a MetaLease- Throws:
IllegalArgumentException- if not a MetaLease
-
equals
-
hashCode
public int hashCode()the destination has enough randomness in it to use it by itself for speed -
toString
-