Here you can find the source of read(ByteBuffer buffer)
public static byte read(ByteBuffer buffer)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { public static byte read(ByteBuffer buffer) { return buffer.get(); }/*from ww w . j av a 2s. co m*/ }