Advertisement
Guest User

Untitled

a guest
May 24th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public int getValue() {
  2.         int result = 0, j = 1;
  3.         numberBytes=getReversedArray(numberBytes);
  4.         for (int i = 0; i < this.numberBytes.length; i++) {
  5.             if (i>1) j *= 256;
  6.             if (i == 1) j += 255;
  7.             result = result + this.numberBytes[i] * j;
  8.         }
  9.         if (this.isNegative()) result = result * (-1);
  10.         return result;
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement