I am trying to read a file written by C code in binary format. When i try to read data stored as unsigned long using Java i am getting wrong value because of the overflow caused by signed & unsigned probelm . I tried using BigInteger and also tried masking but nothing helped. is there any API available for this. I think we need to manually check the magnitude and do something but did anyone face this issue and found a work around