Java Integer Create toInt(byte[] src, int srcPos)

Here you can find the source of toInt(byte[] src, int srcPos)

Description

to Int

License

Open Source License

Declaration

public static int toInt(byte[] src, int srcPos) 

Method Source Code

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

public class Main {

    public static int toInt(byte[] src, int srcPos) {
        int dword = 0;
        for (int i = 0; i < 4; i++) {
            dword = (dword << 8) + (src[i + srcPos] & 0xFF);
        }/*  w  w w. j ava  2  s . co m*/
        return dword;
    }

    public static int toInt(byte[] src) {
        return toInt(src, 0);
    }
}

Related

  1. toInt(byte[] readBuffer, int o)
  2. toInt(byte[] res)
  3. toInt(byte[] si)
  4. toInt(byte[] src)
  5. toInt(byte[] src)
  6. toInt(byte[] value)
  7. toInt(byte[] value)
  8. toInt(char msc, char lsc)
  9. toInt(char[] bytes, boolean le)