Java ByteBuffer to Byte Array getBytes(ByteBuffer byteBuffer, int length)

Here you can find the source of getBytes(ByteBuffer byteBuffer, int length)

Description

get Bytes

License

Apache License

Declaration

public static byte[] getBytes(ByteBuffer byteBuffer, int length) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.nio.ByteBuffer;

public class Main {
    public static byte[] getBytes(ByteBuffer byteBuffer, int length) {
        byte[] bytes = new byte[length];
        byteBuffer.get(bytes);/*from   www .  jav  a  2  s.co m*/
        return bytes;
    }
}

Related

  1. getBytes(ByteBuffer buf)
  2. getBytes(ByteBuffer buf)
  3. getBytes(ByteBuffer buf, byte[] arr)
  4. getBytes(ByteBuffer buf, int length)
  5. getBytes(ByteBuffer buffer, int len)
  6. getBytes(ByteBuffer bytes)
  7. getBytes(ByteBuffer floatCalculator, float number)
  8. getBytes(ByteBuffer in)
  9. getBytes(MappedByteBuffer buffer, int pos, byte[] target)