Java ByteBuffer Set memset(ByteBuffer dstBuffer, int dstByteOffset, byte value, int length)

Here you can find the source of memset(ByteBuffer dstBuffer, int dstByteOffset, byte value, int length)

Description

memset

License

MIT License

Declaration

static void memset(ByteBuffer dstBuffer, int dstByteOffset, byte value,
            int length) 

Method Source Code

//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
        }
    }
}

Related

  1. getEquals(ByteBuffer buf, String s, String charsetName)
  2. getSignedInt(ByteBuffer buffer, int offset)
  3. hash_murmur3_128(ByteBuffer buf, int offset, int size, int i, byte[] result)
  4. isFree(int frameIx, int offset, ByteBuffer[] frames)
  5. macAddressToString(ByteBuffer packet, int offset, boolean needHyphen)
  6. parseContent(ByteBuffer buffer, int offset, int length)
  7. parseToByteBuffer(Object value)
  8. pourBufferToArray(ByteBuffer source, byte[] destination, int offset, int sizeRequested)
  9. readBitset(ByteBuffer bb, int numbytes)