Here you can find the source of getBytes(MappedByteBuffer buffer, int pos, byte[] target)
public static void getBytes(MappedByteBuffer buffer, int pos, byte[] target)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.nio.MappedByteBuffer; public class Main { public static void getBytes(MappedByteBuffer buffer, int pos, byte[] target) { for (int i = 0; i < target.length; ++i) { target[i] = buffer.get(pos + i); }/*from w ww .ja va 2 s. c o m*/ } }