Examples of dataBuffer()


Examples of com.google.flatbuffers.FlatBufferBuilder.dataBuffer()

        // Java code. They are functionally equivalent though.

        try {
            DataOutputStream os = new DataOutputStream(new FileOutputStream(
                                           "monsterdata_java_wire.mon"));
            os.write(fbb.dataBuffer().array(), fbb.dataBuffer().position(), fbb.offset());
            os.close();
        } catch(java.io.IOException e) {
            System.out.println("FlatBuffers test: couldn't write file");
            return;
        }
View Full Code Here

Examples of com.google.flatbuffers.FlatBufferBuilder.dataBuffer()

        // Java code. They are functionally equivalent though.

        try {
            DataOutputStream os = new DataOutputStream(new FileOutputStream(
                                           "monsterdata_java_wire.mon"));
            os.write(fbb.dataBuffer().array(), fbb.dataBuffer().position(), fbb.offset());
            os.close();
        } catch(java.io.IOException e) {
            System.out.println("FlatBuffers test: couldn't write file");
            return;
        }
View Full Code Here

Examples of com.google.flatbuffers.FlatBufferBuilder.dataBuffer()

            System.out.println("FlatBuffers test: couldn't write file");
            return;
        }

        // Test it:
        TestBuffer(fbb.dataBuffer());

        // Make sure it also works with read only ByteBuffers. This is slower,
        // since creating strings incurs an additional copy
        // (see Table.__string).
        TestBuffer(fbb.dataBuffer().asReadOnlyBuffer());
View Full Code Here

Examples of com.google.flatbuffers.FlatBufferBuilder.dataBuffer()

        TestBuffer(fbb.dataBuffer());

        // Make sure it also works with read only ByteBuffers. This is slower,
        // since creating strings incurs an additional copy
        // (see Table.__string).
        TestBuffer(fbb.dataBuffer().asReadOnlyBuffer());

        TestEnums();

        System.out.println("FlatBuffers test: completed successfully");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.