2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
39 else if (wwn.matches(
"^524a937.*"))
59 String res = super.toString();
60 if (null == res) res =
"";
64 BigInteger serDirPort =
wwn.subtract(
wwn.shiftRight(36).shiftLeft(36));
67 BigInteger serPort[] = serDirPort.divideAndRemainder(
new BigInteger(
"100",16));
70 return res + String.format(
"Pure-%07x:%d:%d",serPort[0].intValue(),serPort[1].intValue()/16,serPort[1].intValue() % 16);
72 return res + String.format(
"Pure-%07x-CT%d.FC%d",serPort[0].intValue(),serPort[1].intValue()/16,serPort[1].intValue() % 16);
82 BigInteger serPort[] =
wwn.divideAndRemainder(
new BigInteger(
"10",16));
83 return String.format(
"FC%d",serPort[1].intValue() % 16);