org.mpisws.p2p.transport.simpleidentity
Class InetSocketAddressSerializer
java.lang.Object
org.mpisws.p2p.transport.simpleidentity.InetSocketAddressSerializer
- All Implemented Interfaces:
- Serializer<java.net.InetSocketAddress>
public class InetSocketAddressSerializer
- extends java.lang.Object
- implements Serializer<java.net.InetSocketAddress>, Serializer<java.net.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 java.net.InetSocketAddress deserialize(InputBuffer b,
java.net.InetSocketAddress i,
java.util.Map<java.lang.String,java.lang.Object> options)
throws java.io.IOException
- Throws:
java.io.IOException
serialize
public void serialize(java.net.InetSocketAddress i,
OutputBuffer b)
throws java.io.IOException
- Specified by:
serialize
in interface Serializer<java.net.InetSocketAddress>
- Throws:
java.io.IOException
deserializeAddress
public static java.net.InetSocketAddress deserializeAddress(InputBuffer b)
throws java.io.IOException
- Throws:
java.io.IOException
serializeAddress
public static void serializeAddress(java.net.InetSocketAddress i,
OutputBuffer b)
throws java.io.IOException
- Throws:
java.io.IOException
getSerializedLength
public int getSerializedLength(java.net.InetSocketAddress i)
deserialize
public java.net.InetSocketAddress deserialize(InputBuffer buf)
throws java.io.IOException
- Specified by:
deserialize
in interface Serializer<java.net.InetSocketAddress>
- Throws:
java.io.IOException
Copyright © 2001-2005 - Rice Pastry.