Here you can find the source of getInt(ByteBuffer intCalculator, byte[] bytes)
Parameter | Description |
---|---|
intCalculator | Buffer to do the conversion |
bytes | The bytes |
public static int getInt(ByteBuffer intCalculator, byte[] bytes)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { /**//from ww w . jav a 2 s . c o m * Calculates the corresponding integer given 4 sequential bytes. * @param intCalculator Buffer to do the conversion * @param bytes The bytes * @return Integer value of the bytes */ public static int getInt(ByteBuffer intCalculator, byte[] bytes) { intCalculator.clear(); intCalculator.put(bytes); intCalculator.position(0); return intCalculator.getInt(); } }