Here you can find the source of fillBuffer(ByteBuffer buffer, byte[] bytes)
Parameter | Description |
---|---|
buffer | a parameter |
bytes | a parameter |
public static Buffer fillBuffer(ByteBuffer buffer, byte[] bytes)
//package com.java2s; //License from project: Open Source License import java.nio.Buffer; import java.nio.ByteBuffer; public class Main { /**/*from ww w.ja v a 2 s.c o m*/ * * @param buffer * @param bytes * @return */ public static Buffer fillBuffer(ByteBuffer buffer, byte[] bytes) { for (byte b : bytes) { buffer.put(b); } return buffer; } }