|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.onewire.utils.Address
Utilities to translate and verify the 1-Wire Network address.
Method Summary | |
static boolean |
isValid(byte[] address)
Checks the CRC8 calculation of this 1-Wire Network address. |
static boolean |
isValid(long address)
Checks the CRC8 calculation of this 1-Wire Network address. |
static boolean |
isValid(java.lang.String address)
Checks the CRC8 calculation of this 1-Wire Network address. |
static byte[] |
toByteArray(long address)
Convert an iButton or 1-Wire device address as a long (little endian) into an array of bytes. |
static byte[] |
toByteArray(java.lang.String address)
Converts a 1-Wire Network Address string (big endian) to a byte array (little endian). |
static long |
toLong(byte[] address)
Converts a 1-Wire Network Address to a long (little endian). |
static long |
toLong(java.lang.String address)
Converts a 1-Wire Network Address to a long (little endian). |
static java.lang.String |
toString(byte[] address)
Converts a 1-Wire Network address byte array (little endian) to a hex string representation (big endian). |
static java.lang.String |
toString(long address)
Converts a 1-Wire Network address long (little endian) to a hex string representation (big endian). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean isValid(byte[] address)
address
- iButton or 1-Wire Network address to verifytrue
if the family code is non-zero and the
CRC8 calculation is correct.public static boolean isValid(java.lang.String address)
address
- iButton or 1-Wire Network address to verifytrue
if the family code is non-zero and the
CRC8 calculation is correct.public static boolean isValid(long address)
address
- iButton or 1-Wire Network address to verifytrue
if the family code is non-zero and the
CRC8 calculation is correct.public static java.lang.String toString(byte[] address)
address,
- family code first.public static java.lang.String toString(long address)
address,
- family code first.public static byte[] toByteArray(java.lang.String address)
address,
- family code last.public static byte[] toByteArray(long address)
public static long toLong(byte[] address)
public static long toLong(java.lang.String address)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |