nl.openfortress.socket6bed4
Class Inet6bed4Address

java.lang.Object
  extended by nl.openfortress.socket6bed4.Inet6bed4Address

public final class Inet6bed4Address
extends Object

The Inet6bed4Address class acts a bit like InetAddress and Inet6Address. It is not, however related to these classes; they are locked down by the Java language [1]. There are a few calls similar to those in Inet*Address that are also available here; however, an address created here will be an Inet6Address. [1] Inet6Address is a final class, and InetAddress has no constructors to call. Nasty.


Method Summary
static Inet6Address getByAddress(byte[] addr)
          Return an Inet6bed4Address based on a byte string.
static Inet6Address getLocalHost()
          Returns the shared 6bed4 address for this host.
static boolean is6bed4Address(byte[] addr)
          Test if the given byte array represents a 6bed4 address.
static boolean is6bed4Address(Inet6Address ia)
          Test if a given InetAddress is a 6bed4 address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLocalHost

public static Inet6Address getLocalHost()
                                 throws UnknownHostException
Returns the shared 6bed4 address for this host. Note that a 6bed4 address is available on any host that has an IPv4 address and supports IPv6. This is also the when a native IPv6 address exists. You should however prefer native IPv6 over 6bed4, except perhaps for the communication with 6bed4 peers.

Throws:
UnknownHostException

is6bed4Address

public static boolean is6bed4Address(Inet6Address ia)
Test if a given InetAddress is a 6bed4 address. Note that this does not guarantee that it can be cast to an Inet6bed4Address. TODO: See notes for is6bed4Address(byte addr[])


is6bed4Address

public static boolean is6bed4Address(byte[] addr)
Test if the given byte array represents a 6bed4 address. TODO: These addresses are subject to change until 6bed4 is formalised as an RFC! Please subscribe to tun6bed4-infra for (only those) updates: https://lists.sourceforge.net/lists/listinfo/tun6bed4-infra The intention is to obtain a /16 for ten years to come, and recognise a 6bed4 address based on that.


getByAddress

public static Inet6Address getByAddress(byte[] addr)
Return an Inet6bed4Address based on a byte string. TODO: Perhaps try sharing with existing instances?



Copyright © 2012. All Rights Reserved.