2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
46 else if (wwn.matches(
"5000097.*"))
61 String res = super.toString();
62 if (null == res) res =
"";
65 BigInteger serDirPort =
wwn.subtract(
wwn.shiftRight(36).shiftLeft(36));
70 BigInteger countDirPort[] = serDirPort.divideAndRemainder(
new BigInteger(
"200000000",16));
71 BigInteger modelDirPort[] = countDirPort[1].divideAndRemainder(
new BigInteger(
"8000000",16));
74 switch (countDirPort[0].intValue())
89 switch (modelDirPort[0].intValue())
111 BigInteger serialDirPort[] = modelDirPort[1].divideAndRemainder(
new BigInteger(
"400",16));
114 BigInteger procDirPort[] = serialDirPort[1].divideAndRemainder(
new BigInteger(
"40",16));
117 BigInteger dirDirPort[] = procDirPort[1].divideAndRemainder(
new BigInteger(
"4",16));
118 return res + String.format(
"%0"+(
brief?4:5)+
"d-%02d%c%c",serialDirPort[0].intValue(),dirDirPort[0].intValue()+1,procDirPort[0].intValue()+
'a',dirDirPort[1].intValue()+
'A');