Code example for LongBuffer

Methods: capacityclearasReadOnlyBufferduplicatehashCode

0
    public void testHasArray() { 
        assertNotNull(buf.array());
    } 
 
    public void testHashCode() { 
        buf.clear();
        LongBuffer readonly = buf.asReadOnlyBuffer();
        LongBuffer duplicate = buf.duplicate();
        assertTrue(buf.hashCode() == readonly.hashCode());
 
        assertTrue(buf.capacity() > 5);
        duplicate.position(buf.capacity() / 2);
        assertTrue(buf.hashCode() != duplicate.hashCode());
    } 
 
    public void testIsDirect() { 
        assertFalse(buf.isDirect());
    } 
 
    public void testOrder() {