title: Java - parse and unsigned hex string into a signed long
body: <p>I have a bunch of hex strings, one of them, for example is:</p>
  
  <pre><code>  d1bc4f7154ac9edb
  </code></pre>
  
  <p>which is the hex value of "-3333702275990511909".  This is the same hex you get if you do Long.toHexString("d1bc4f7154ac9edb");</p>
  
  <p>For now, let's just assume I only have access to the hex string values and that is it.  Doing this:</p>
  
  <pre><code>  Long.parseLong(hexstring, 16);
  </code></pre>
  
  <p>Doesn't work because it converts it to a different value that is too large for a Long.  Is there away to convert these unsigned hex values into signed longs?</p>
  
  <p>Thanks!</p>