2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
46 else if (wwn.matches(
"2[0-9a-f]0[0-9a-f]0020c2.*"))
59 String res = super.toString();
60 if (null == res) res =
"";
64 BigInteger nodePortOUISer[] =
wwn.divideAndRemainder(
new BigInteger(
"1000000",16));
67 BigInteger nodePortOUI[] = nodePortOUISer[0].divideAndRemainder(
new BigInteger(
"1000000",16));
69 BigInteger nodePort[] = nodePortOUI[0].divideAndRemainder(
new BigInteger(
"100",16));
71 BigInteger serial[] = nodePortOUISer[1].divideAndRemainder(
new BigInteger(
"10000",16));
74 return res + String.format(
"RamSan-%c%04X-FC-%x%c",serial[0].intValue()-1+
'A', serial[1].intValue(), nodePort[1].intValue()/4, nodePort[0].intValue() % 16 +
'A');