⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e168. determining if a bytebuffer is direct.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
A non-direct ByteBuffer is one where the contents are stored in the normal memory. A direct ByteBuffer is one where the contents are stored in some I/O device such as a disk drive or video board. 
See also e158 Creating a ByteBuffer. 

    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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -