Java Integer Create toInt(byte[] bRefArr)

Here you can find the source of toInt(byte[] bRefArr)

Description

to Int

License

Open Source License

Declaration

public static int toInt(byte[] bRefArr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int toInt(byte[] bRefArr) {
        int iOutcome = 0;
        byte bLoop;
        for (int i = 0, len = bRefArr.length; i < len; i++) {
            bLoop = bRefArr[i];/* w w w .  j  a  v a2 s  .  c  o  m*/
            iOutcome += (bLoop & 0xFF) << (8 * (len - 1 - i));
        }
        return iOutcome;
    }
}

Related

  1. toInt(byte[] b)
  2. toInt(byte[] b)
  3. toInt(byte[] b)
  4. toInt(byte[] b, int begin_index, int len)
  5. toInt(byte[] block, int pos, int len)
  6. toInt(byte[] buf)
  7. toInt(byte[] buf)
  8. toInt(byte[] buf, int off)
  9. toInt(byte[] buf, int pos)