[jcifs] nbtscan and mac addresses
Michael B Allen
mba2000 at ioplex.com
Thu Aug 5 03:53:34 GMT 2004
Eric Glass said:
BTW the jcifs.util.Hexdump class is good for formatting hex values. E.g.:
> byte[] mac = NbtAddress.getByName(args[0]).getMacAddress();
> if (mac != null) {
String hex = jcifs.util.Hexdump.toHexString(mac, 0, 6);
> System.out.println();
> System.out.println("MAC Address: 0x" + hex);
> }
Also, note that a notation like 0x123456789abc not common for byte
sequences. In fact the only other place I've seen it is in your NTLM
documentation. I would have much rather seen hexdump notation in that
documentation like:
00000: 12 34 56 78 9a bc |........|
> On a semi-related note, NbtAddress.getHostName() appears to return the
> "unclean" name (i.e., getHostName() returns "hostName.name" while
> toString() returns "hostName.toString()"). Didn't know if that was
> intentional or not.
What are example outputs of "unclean" names?
Mike
More information about the jcifs
mailing list