com.aelitis.azureus.core.subs.impl
Class SubscriptionBodyImpl
java.lang.Object
com.aelitis.azureus.core.subs.impl.SubscriptionBodyImpl
public class SubscriptionBodyImpl
- extends java.lang.Object
Constructor Summary |
protected |
SubscriptionBodyImpl(SubscriptionManagerImpl _manager,
java.util.Map _map)
|
protected |
SubscriptionBodyImpl(SubscriptionManagerImpl _manager,
java.lang.String _name,
boolean _is_public,
boolean _is_anonymous,
java.lang.String _json_content,
byte[] _public_key,
int _version,
int _az_version,
java.util.Map _singleton_details)
|
protected |
SubscriptionBodyImpl(SubscriptionManagerImpl _manager,
SubscriptionImpl _subs)
|
Method Summary |
protected static byte[] |
deriveShortID(byte[] public_key,
java.util.Map singleton_details)
|
protected static byte[] |
deriveSingletonShortID(java.util.Map singleton_details)
|
protected static byte[] |
encode(byte[] hash,
int version,
int size)
|
protected int |
getAZVersion()
|
protected byte[] |
getHash()
|
protected java.lang.String |
getJSON()
|
protected java.lang.String |
getName()
|
protected byte[] |
getPublicKey()
|
byte[] |
getShortID()
|
protected byte[] |
getSig()
|
protected int |
getSigDataSize()
|
protected java.util.Map |
getSingletonDetails()
|
protected int |
getVersion()
|
protected boolean |
isAnonymous()
|
protected boolean |
isPublic()
|
protected void |
load(java.util.Map _map,
boolean _verify)
|
protected void |
rethrow(java.lang.Throwable e)
|
protected void |
setJSON(java.lang.String _json)
|
protected static byte[] |
sign(byte[] private_key,
byte[] hash,
int version,
int size)
|
protected void |
updateDetails(SubscriptionImpl subs,
java.util.Map details)
|
protected static boolean |
verify(byte[] public_key,
byte[] hash,
int version,
int size,
byte[] sig)
|
protected void |
writeVuzeFile(SubscriptionImpl subs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubscriptionBodyImpl
protected SubscriptionBodyImpl(SubscriptionManagerImpl _manager,
SubscriptionImpl _subs)
throws SubscriptionException
- Throws:
SubscriptionException
SubscriptionBodyImpl
protected SubscriptionBodyImpl(SubscriptionManagerImpl _manager,
java.util.Map _map)
throws java.io.IOException
- Throws:
java.io.IOException
SubscriptionBodyImpl
protected SubscriptionBodyImpl(SubscriptionManagerImpl _manager,
java.lang.String _name,
boolean _is_public,
boolean _is_anonymous,
java.lang.String _json_content,
byte[] _public_key,
int _version,
int _az_version,
java.util.Map _singleton_details)
throws java.io.IOException
- Throws:
java.io.IOException
encode
protected static byte[] encode(byte[] hash,
int version,
int size)
sign
protected static byte[] sign(byte[] private_key,
byte[] hash,
int version,
int size)
throws java.lang.Exception
- Throws:
java.lang.Exception
verify
protected static boolean verify(byte[] public_key,
byte[] hash,
int version,
int size,
byte[] sig)
deriveShortID
protected static byte[] deriveShortID(byte[] public_key,
java.util.Map singleton_details)
deriveSingletonShortID
protected static byte[] deriveSingletonShortID(java.util.Map singleton_details)
load
protected void load(java.util.Map _map,
boolean _verify)
throws java.io.IOException
- Throws:
java.io.IOException
updateDetails
protected void updateDetails(SubscriptionImpl subs,
java.util.Map details)
throws java.io.IOException
- Throws:
java.io.IOException
getName
protected java.lang.String getName()
getPublicKey
protected byte[] getPublicKey()
getShortID
public byte[] getShortID()
isPublic
protected boolean isPublic()
isAnonymous
protected boolean isAnonymous()
getJSON
protected java.lang.String getJSON()
getSingletonDetails
protected java.util.Map getSingletonDetails()
setJSON
protected void setJSON(java.lang.String _json)
getVersion
protected int getVersion()
getAZVersion
protected int getAZVersion()
getHash
protected byte[] getHash()
getSig
protected byte[] getSig()
getSigDataSize
protected int getSigDataSize()
writeVuzeFile
protected void writeVuzeFile(SubscriptionImpl subs)
throws SubscriptionException
- Throws:
SubscriptionException
rethrow
protected void rethrow(java.lang.Throwable e)
throws SubscriptionException
- Throws:
SubscriptionException