Rice Pastry API

org.mpisws.p2p.transport.simpleidentity
Class InetSocketAddressSerializer

java.lang.Object
  extended by 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

Field Summary
static byte IPV4
           
static int IPV4_BYTES
           
static byte IPV6
           
static int IPV6_BYTES
           
 
Constructor Summary
InetSocketAddressSerializer()
           
 
Method Summary
 java.net.InetSocketAddress deserialize(InputBuffer buf)
           
 java.net.InetSocketAddress deserialize(InputBuffer b, java.net.InetSocketAddress i, java.util.Map<java.lang.String,java.lang.Object> options)
           
static java.net.InetSocketAddress deserializeAddress(InputBuffer b)
           
 int getSerializedLength(java.net.InetSocketAddress i)
           
 void serialize(java.net.InetSocketAddress i, OutputBuffer b)
           
static void serializeAddress(java.net.InetSocketAddress i, OutputBuffer b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

InetSocketAddressSerializer

public InetSocketAddressSerializer()
Method Detail

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

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection