Java Integer Create toInt(byte[] bytes, int index)

Here you can find the source of toInt(byte[] bytes, int index)

Description

to Int

License

Apache License

Declaration

public static int toInt(byte[] bytes, int index) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int toInt(byte[] bytes, int index) {
        return (0xff & bytes[index]) | (0xff00 & (bytes[index + 1] << 8)) | (0xff0000 & (bytes[index + 2] << 16))
                | (0xff000000 & (bytes[index + 3] << 24));
    }/*from w w  w . j  a  v  a 2  s  .  co  m*/
}

Related

  1. toInt(byte[] bytes)
  2. toInt(byte[] bytes)
  3. toInt(byte[] bytes)
  4. toInt(byte[] bytes)
  5. toInt(byte[] bytes, boolean isBigEndian)
  6. toInt(byte[] bytes, int offset)
  7. toInt(byte[] bytes, int offset)
  8. toInt(byte[] bytes, int offset)
  9. toInt(byte[] bytes, int offset)