//如果你的数值还没有超过一个long型长度的话
class IntegerBase36
{
private long val;
public IntegerBase36(long v)
{
val = v;
}
public IntegerBase36(String vstr) //e.g. vstr="10000000A"
{
val = 0;
for(int i=0; i<vstr.length(); i++)
{
char c = vstr.charAt(i);
if(c>='0' && c<='9')
val += c-'0';
else
val += c-'A';
}
}
public void add(long v1)
{
val += v;
}
public void add(IntegerBase36 ib36)
{
val += ib36.longValue();
}
public long longValue()
{
return val;
}
public String toString()
{
long v = val;
StringBuffer s = new StringBuffer();
do{
if((v % 36) <= 9)
s.append((char)('0'+(v%36)));
else
s.append((char)('A'+(v%36)));
v /= 36;
}while(v != 0);