Android Byte Array to Int Convert bytesToInt(byte[] in)

Here you can find the source of bytesToInt(byte[] in)


bytes To Int


Open Source License


public static int bytesToInt(byte[] in) 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {
    public static int bytesToInt(byte[] in) {
        return ByteBuffer.wrap(in).getInt(); //note: big-endian by default
    }//from  www.j  av a2 s  .  c om


  1. byteArrayToInt(byte[] bytes)
  2. bytes2Int(byte[] data)
  3. bytesToInt(byte[] b)
  4. bytesToInt(byte[] bytes)
  5. bytesToInt(byte[] bytes)
  6. bytesLE2int(byte[] b, int off)
  7. bytesLE2ints(byte[] b)
  8. byteToUint(byte b)
  9. bytes2uint(byte[] bytes, int from, int to)