2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
67 else if (wwn.matches(
"2[0-9a-f]{3}00110a[0-9a-f]{6}"))
87 String res = super.toString();
88 if (null == res) res =
"";
92 BigInteger portOuiSer[] =
wwn.divideAndRemainder(
new BigInteger(
"1000000",16));
95 BigInteger portOui[] = portOuiSer[0].divideAndRemainder(
new BigInteger(
"1000000",16));
99 return res + String.format(
"HPVC-%06x:%03x",portOuiSer[1].intValue(),portOui[0].intValue() % (1 << 12) );
109 BigInteger serPort[] =
wwn.divideAndRemainder(
new BigInteger(
"1000000000000",16));
110 return String.format(
"%03x",serPort[0].intValue() % (1 << 12));