Java examples for File Path IO:ByteBuffer
Determining If a ByteBuffer Is Direct
import java.nio.ByteBuffer; public class Main { public void main(String[] argv) { ByteBuffer bbuf = ByteBuffer.wrap(new byte[10]); boolean isDirect = bbuf.isDirect(); // false bbuf = ByteBuffer.allocate(10); isDirect = bbuf.isDirect(); // false bbuf = ByteBuffer.allocateDirect(10); isDirect = bbuf.isDirect(); // true }//from w w w. j a v a2 s .c o m }