We would like to know how to create ByteBuffer from byte array.
import java.nio.ByteBuffer; // w w w . j a va 2s . c om public class Main { public static void main(String[] argv) throws Exception { byte[] bytes = new byte[10]; ByteBuffer buf = ByteBuffer.wrap(bytes); } }