net.sf.neem.impl
Class Addresses

java.lang.Object
  extended by net.sf.neem.impl.Addresses

public abstract class Addresses
extends java.lang.Object

Address manipulation utilities. Provides methods to read/write InetSocketAddress addresses from/to a ByteBuffers.


Method Summary
static java.net.InetSocketAddress readAddressFromBuffer(java.nio.ByteBuffer[] msg)
          Read a socket address from an array of ByteBuffers into an InetSocketAddress.
static java.nio.ByteBuffer writeAddressToBuffer(java.net.InetSocketAddress addr)
          Write a socket address to a ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeAddressToBuffer

public static java.nio.ByteBuffer writeAddressToBuffer(java.net.InetSocketAddress addr)
Write a socket address to a ByteBuffer.

Parameters:
addr - The address to be written.

readAddressFromBuffer

public static java.net.InetSocketAddress readAddressFromBuffer(java.nio.ByteBuffer[] msg)
Read a socket address from an array of ByteBuffers into an InetSocketAddress.

Parameters:
msg - The buffer from which to read the address from.
Returns:
The address read.


Copyright © 2005 University of Minho, Portugal. All Rights Reserved.