Here you can find the source of toInt(ByteBuffer bytes)
Parameter | Description |
---|---|
bytes | byte buffer to convert to integer |
public static int toInt(ByteBuffer bytes)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { /**/* w ww . j a va 2s. c o m*/ * Convert a byte buffer to an integer. * Does not change the byte buffer position. * * @param bytes byte buffer to convert to integer * @return int representation of the byte buffer */ public static int toInt(ByteBuffer bytes) { return bytes.getInt(bytes.position()); } }