Here you can find the source of getIntFromByteArray(final byte[] bytes)
Parameter | Description |
---|---|
bytes | the bytes |
public static int getIntFromByteArray(final byte[] bytes)
//package com.java2s; import java.nio.ByteBuffer; public class Main { /**// w w w . j a va 2s . c o m * Converts a byte array to an int. * * @param bytes the bytes * @return the int from byte array */ public static int getIntFromByteArray(final byte[] bytes) { return ByteBuffer.wrap(bytes).getInt(); } }