org.mpisws.p2p.transport.simpleidentity
Class InetSocketAddressSerializer
java.lang.Object
org.mpisws.p2p.transport.simpleidentity.InetSocketAddressSerializer
- All Implemented Interfaces:
- Serializer<InetSocketAddress>
public class InetSocketAddressSerializer
- extends Object
- implements Serializer<InetSocketAddress>, Serializer<InetSocketAddress>
Serialized version
byte IPversion (4 or 6)
byte[] address (4 or 16 bytes)
short port
- Author:
- Jeff Hoye
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IPV4
public static final byte IPV4
- See Also:
- Constant Field Values
IPV6
public static final byte IPV6
- See Also:
- Constant Field Values
IPV4_BYTES
public static final int IPV4_BYTES
- See Also:
- Constant Field Values
IPV6_BYTES
public static final int IPV6_BYTES
- See Also:
- Constant Field Values
InetSocketAddressSerializer
public InetSocketAddressSerializer()
deserialize
public InetSocketAddress deserialize(InputBuffer b,
InetSocketAddress i,
Map<String,Object> options)
throws IOException
- Throws:
IOException
serialize
public void serialize(InetSocketAddress i,
OutputBuffer b)
throws IOException
- Specified by:
serialize in interface Serializer<InetSocketAddress>
- Throws:
IOException
deserializeAddress
public static InetSocketAddress deserializeAddress(InputBuffer b)
throws IOException
- Throws:
IOException
serializeAddress
public static void serializeAddress(InetSocketAddress i,
OutputBuffer b)
throws IOException
- Throws:
IOException
getSerializedLength
public int getSerializedLength(InetSocketAddress i)
deserialize
public InetSocketAddress deserialize(InputBuffer buf)
throws IOException
- Specified by:
deserialize in interface Serializer<InetSocketAddress>
- Throws:
IOException
Copyright © 2010. All Rights Reserved.