Here you can find the source of memset(ByteBuffer dstBuffer, int dstByteOffset, byte value, int length)
static void memset(ByteBuffer dstBuffer, int dstByteOffset, byte value, int length)
//package com.java2s; // Licensed under the MIT License: import java.nio.ByteBuffer; public class Main { static void memset(ByteBuffer dstBuffer, int dstByteOffset, byte value, int length) { // TODO we can probably do this faster for (int ii = dstByteOffset; ii < dstByteOffset + length; ++ii) { dstBuffer.put(ii, value);// w ww. j av a 2 s . c o m } } }