mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Initial commit of the FlatBuffers code.
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920 Tested: using VS2010 / Xcode / gcc on Linux.
This commit is contained in:
23
tests/MyGame/Example/Test.java
Executable file
23
tests/MyGame/Example/Test.java
Executable file
@@ -0,0 +1,23 @@
|
||||
// automatically generated, do not modify
|
||||
|
||||
package MyGame.Example;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import flatbuffers.*;
|
||||
|
||||
public class Test extends Struct {
|
||||
public Test __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
|
||||
public short a() { return bb.getShort(bb_pos + 0); }
|
||||
public byte b() { return bb.get(bb_pos + 2); }
|
||||
|
||||
public static int createTest(FlatBufferBuilder builder, short a, byte b) {
|
||||
builder.prep(2, 0);
|
||||
builder.pad(1);
|
||||
builder.putByte(b);
|
||||
builder.putShort(a);
|
||||
return builder.offset();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user