Here you can find the source of putUnsignedByte(ByteBuffer bb, int value)
public static void putUnsignedByte(ByteBuffer bb, int value)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { public static void putUnsignedByte(ByteBuffer bb, int value) { bb.put((byte) (value & 0xff)); }/*w w w. j av a 2 s. c om*/ public static void putUnsignedByte(ByteBuffer bb, int position, int value) { bb.put(position, (byte) (value & 0xff)); } }