Package test.Example

Examples of test.Example.bar


        // Allocate and initialize some memory on the heap.
        long ptr = malloc(bar.SIZEOF);
        memset(ptr, 0, bar.SIZEOF);

        // Configure an object that can be mapped to a C structure.
        bar expected = new bar();
        expected.a = 35;
        expected.b = Integer.MAX_VALUE;
       
        System.arraycopy("Hello World!".getBytes(), 0, expected.c, 0, 5);
       
        // Marshal the object to the allocated heap memory
        memmove(ptr, expected, bar.SIZEOF);
       
        // Unmarshal the object from the allocated heap memory.
        bar acutal = new bar();
        memmove(acutal, ptr, bar.SIZEOF);
       
        assertEquals(expected, acutal);
    
        Callback callback = new Callback(this, "instanceCallback", 1);
View Full Code Here

TOP

Related Classes of test.Example.bar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.