Here you can find the source of putByte(ByteBuffer byteBuffer, int value)
public static void putByte(ByteBuffer byteBuffer, int value)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { private static final int BYTE_PADDING = 0xFF; public static void putByte(ByteBuffer byteBuffer, int value) { byteBuffer.put((byte) (value & BYTE_PADDING)); }// w ww . j a va 2 s.c o m public static void putByte(ByteBuffer byteBuffer, int position, int value) { byteBuffer.put(position, (byte) (value & BYTE_PADDING)); } }