Package org.bitcoinj.base
Interface AddressParser
- 
- All Known Implementing Classes:
 Wallet
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
@FunctionalInterface public interface AddressParserFunctional interface for parsing anAddress. It takes aStringparameter and will parse address strings for a configured set ofNetworks. For example, if the parser was created with (getDefault(Network)it will only parse addresses for the provided value ofNetwork. If created withgetDefault()it will parse addresses matching any known network. The default set of known networks is defined byBitcoinNetwork.Note: Be aware that the value returned by
Address.network()will be normalized. SeeAddress.network()for details. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAddressParser.AddressParserProviderInterface implemented by custom address parser providers. 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description static AddressParsergetDefault()static AddressParsergetDefault(Network network)static AddressParsergetLegacy()Deprecated.static AddressParsergetLegacy(Network network)Deprecated.static AddressParsergetLegacy(NetworkParameters params)Deprecated.AddressparseAddress(java.lang.String addressString)Parse an address for a configured set ofNetworks. 
 - 
 
- 
- 
Method Detail
- 
parseAddress
Address parseAddress(java.lang.String addressString) throws AddressFormatException
Parse an address for a configured set ofNetworks.- Parameters:
 addressString- string representation of an address- Returns:
 - A validated address object
 - Throws:
 AddressFormatException- invalid address string
 
- 
getDefault
static AddressParser getDefault()
- Returns:
 - The default parser for address and networks types built-in to bitcoinj.
 
 
- 
getDefault
static AddressParser getDefault(Network network)
- Parameters:
 network- the network to parse for- Returns:
 - The default (built-in) parser for network
 
 
- 
getLegacy
@Deprecated static AddressParser getLegacy()
Deprecated.Get a legacy address parser that knows about networks that have been dynamically added to the list maintained byNetworks.- Returns:
 - A parser for all known networks
 
 
- 
getLegacy
@Deprecated static AddressParser getLegacy(Network network)
Deprecated.Get a legacy address parser that knows about networks that have been dynamically added to the list maintained byNetworks.- Parameters:
 network- the network to parse for- Returns:
 - A parser that will throw for strings that are not valid for network.
 
 
- 
getLegacy
@Deprecated static AddressParser getLegacy(@Nullable NetworkParameters params)
Deprecated.Get a legacy address parser that knows about networks that have been dynamically added to the list maintained byNetworks.- Parameters:
 params- the network to parser for, ornullfor all networks.- Returns:
 - A parser that will throw for strings that are not valid for network.
 
 
 - 
 
 -