SunSPOT host API V3.0


com.sun.spot.util
Class IEEEAddress

java.lang.Object
  extended by com.sun.spot.util.IEEEAddress

public class IEEEAddress
extends Object


Constructor Summary
IEEEAddress(long address)
           
IEEEAddress(String ieeeAddressString)
           
 
Method Summary
 String asDottedHex()
          Generate a dotted hex string from an IEEE address
 long asLong()
           
 boolean equals(Object anObject)
           
 int hashCode()
           
static String toDottedHex(long address)
          Convert a numeric address into a dotted-hex string
static long toLong(String ieeeAddressString)
          Convert a string representation of the address to a numeric value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IEEEAddress

public IEEEAddress(long address)

IEEEAddress

public IEEEAddress(String ieeeAddressString)
Method Detail

toDottedHex

public static String toDottedHex(long address)
Convert a numeric address into a dotted-hex string

Parameters:
address - the address to convert
Returns:
the dotted-hex string

toLong

public static long toLong(String ieeeAddressString)
Convert a string representation of the address to a numeric value. On the host computer, the string is first looked up in the keys of the property file spot.names in the user's home directory. If present, the corresponding value is used in place of the string parameter. Then, the string is first assumed to be dotted hex (that's four four-digit hex numbers separated by full stops). If that conversion fails, the string is parsed as a decimal number. On the host computer, the strng

Parameters:
ieeeAddressString - the string to convert
Returns:
the numeric value of the address

asDottedHex

public String asDottedHex()
Generate a dotted hex string from an IEEE address

Returns:
a dotted hex string

asLong

public long asLong()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object anObject)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

SunSPOT host API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.