Java ByteBuffer to Byte Array bytes(ByteBuffer buf)

Here you can find the source of bytes(ByteBuffer buf)

Description

bytes

License

Open Source License

Declaration

public static byte[] bytes(ByteBuffer buf) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;

public class Main {
    public static byte[] bytes(ByteBuffer buf) {
        byte[] d = new byte[buf.limit()];
        buf.get(d);/*  ww  w.j  av a 2s . c  o  m*/
        return d;
    }
}

Related

  1. ByteBufferToByteArray(ByteBuffer byteBuffer)
  2. byteBufferToByteArray(ByteBuffer byteBuffer)
  3. byteBufferToByteArray(List byteBufferList)
  4. byteBufferToBytes(ByteBuffer buffer)
  5. bytes(ByteBuffer bb)
  6. convertToBytes(@Nonnull ByteBuffer buffer)
  7. convertVarIntByteBufferToByteArray(ByteBuffer byteBuffer)
  8. deserializeBytes(ByteBuffer buf)
  9. getByteArray(ByteBuffer buff)