How can unsigned int/char values be used in java
<p>I am trying to mimick a old legacy C program behavior in Java. The C code is :</p>

<pre><code>void calc_crc(unsigned char *datbuff,unsigned int length)
{
static unsigned char tmp;
static unsigned int crc,zaehler;
crc = 0;
for (zaehler = 0;zaehler &lt; length ;zaehler ++)
{
tmp=(unsigned char) (crc&gt;&gt;8) ;
crc=(crc&lt;&lt;8) ^ crctab[tmp] ^ *datbuff;
datbuff++;
}
}

static unsigned short crctab[256] =
{ // Some values
};
</code></pre>

<p>The first issue is this code uses unsigned where as java is signed. Trying hard to retain those values. 
Can we get the same results in java too.</p>
