Here you can find the source of readByteAsInt(ByteBuffer buffer)
public static int readByteAsInt(ByteBuffer buffer) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.ByteBuffer; public class Main { public static int readByteAsInt(ByteBuffer buffer) throws IOException { return Byte.toUnsignedInt(buffer.get()); }//from ww w. j a va2s . c o m }