@@ -0,0 +1,594 @@
+package com.yeungeek.basicjava.nio;%0A%0Aimport sun.nio.ch.DirectBuffer;%0A%0Aimport java.nio.ByteBuffer;%0Aimport java.util.concurrent.TimeUnit;%0A%0Apublic class DirectByteBufferTest %7B%0A    public static void main(String%5B%5D args) throws InterruptedException %7B%0A//        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(1024 * 1024 * 128);%0A        DirectBuffer byteBuffer = (DirectBuffer)ByteBuffer.allocateDirect(1024 * 1024 * 512);%0A        TimeUnit.SECONDS.sleep(10);%0A        //clean%0A        byteBuffer.cleaner().clean();%0A%0A        TimeUnit.SECONDS.sleep(10);%0A%0A        System.out.println(%22run ok%22);%0A    %7D%0A%7D%0A

add direct byte buffer test