Package org.bitcoinj.base.exceptions
Class AddressFormatException.WrongNetwork
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.bitcoinj.base.exceptions.AddressFormatException
org.bitcoinj.base.exceptions.AddressFormatException.InvalidPrefix
org.bitcoinj.base.exceptions.AddressFormatException.WrongNetwork
- All Implemented Interfaces:
 Serializable
- Enclosing class:
 - AddressFormatException
 
public static class AddressFormatException.WrongNetwork
extends AddressFormatException.InvalidPrefix
This exception is thrown by the 
EncodedPrivateKey hierarchy of classes when you try and decode an
 address with a prefix (version header or human-readable part) that used by another network (usually: mainnet vs
 testnet). You shouldn't allow the user to proceed in this case as they are trying to send money across different
 chains, an operation that is guaranteed to destroy the money.- See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class org.bitcoinj.base.exceptions.AddressFormatException
AddressFormatException.InvalidCharacter, AddressFormatException.InvalidChecksum, AddressFormatException.InvalidDataLength, AddressFormatException.InvalidPrefix, AddressFormatException.UnexpectedWitnessVersion, AddressFormatException.WrongNetwork - 
Constructor Summary
Constructors - 
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
- 
Constructor Details
- 
WrongNetwork
public WrongNetwork(int versionHeader)  - 
WrongNetwork
 
 -