|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AddressSerializer
Used to (de)serialize Addresses over a network connection
| Method Summary | |
|---|---|
Address |
deserialize(byte[] serializedAddress)
deserialize a byte [] representation of an Address, typically as read from a network message, into an Address. |
Address |
deserialize(String address)
Turns a user-input String into an Address |
Class<? extends Address> |
getAddressClass()
|
String |
getAddressType()
|
void |
register(AddressFactory factory)
Register this AddressSerializer with an
AddressFactory |
byte[] |
serialize(Address address)
serialize an Address into a byte [], typically to include in a network message |
| Method Detail |
|---|
@Inject void register(AddressFactory factory)
AddressSerializer with an
AddressFactory
factory - String getAddressType()
Class<? extends Address> getAddressClass()
Address deserialize(byte[] serializedAddress)
throws IOException
serializedAddress -
IOException - if the input cannot be deserialized into
an Address
byte[] serialize(Address address)
throws IOException
address - a non-null address
IOException - if an error occurs serializing the
Address
Address deserialize(String address)
throws IOException
address -
IOException - if the input cannot be converted into an Address
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||