Package de.mhus.lib.core.currency
Class CAddress
- java.lang.Object
-
- de.mhus.lib.core.currency.CAddress
-
- All Implemented Interfaces:
Externalizable,Serializable
public class CAddress extends Object implements Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CAddress()CAddress(CCurrency currency, String addr)CAddress(CCurrency currency, String addr, SecureString privKey)CAddress(CCurrency currency, String addr, String privKey)CAddress(String curAddr)CAddress(String currency, String addr)CAddress(String currency, String addr, SecureString privKey)CAddress(String currency, String addr, String privKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoSecure()Remove all private informations inside of the object.booleanequals(Object in)StringgetAddress()Return the public address in the format it is used in the wallets (e.g.StringgetAddressWithSchema()StringgetCurrency()SecureStringgetPrivate()Return private address or null if unknown.StringgetScheme()booleanisSecure()Return true if it's secure to give the object away to non secure areas.voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(ObjectOutput out)
-
-
-
Field Detail
-
currency
protected String currency
-
address
protected String address
-
privKey
protected SecureString privKey
-
scheme
protected String scheme
-
-
Constructor Detail
-
CAddress
public CAddress()
-
CAddress
public CAddress(CCurrency currency, String addr, SecureString privKey)
-
CAddress
public CAddress(String currency, String addr, SecureString privKey)
-
CAddress
public CAddress(String curAddr)
-
-
Method Detail
-
getPrivate
public final SecureString getPrivate()
Return private address or null if unknown.- Returns:
- the private key
-
getAddress
public final String getAddress()
Return the public address in the format it is used in the wallets (e.g. compressed).- Returns:
- the address
-
doSecure
public final void doSecure()
Remove all private informations inside of the object. You can call the method multiple times without error even if the address is already secure.
-
isSecure
public final boolean isSecure()
Return true if it's secure to give the object away to non secure areas.- Returns:
- true if the private key is a secret
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
getCurrency
public String getCurrency()
-
getScheme
public String getScheme()
-
getAddressWithSchema
public String getAddressWithSchema()
-
-