...

Text file src/github.com/google/flatbuffers/tests/MyGame/Example/ArrayTableT.java

Documentation: github.com/google/flatbuffers/tests/MyGame/Example

     1// automatically generated by the FlatBuffers compiler, do not modify
     2
     3package MyGame.Example;
     4
     5import com.google.flatbuffers.BaseVector;
     6import com.google.flatbuffers.BooleanVector;
     7import com.google.flatbuffers.ByteVector;
     8import com.google.flatbuffers.Constants;
     9import com.google.flatbuffers.DoubleVector;
    10import com.google.flatbuffers.FlatBufferBuilder;
    11import com.google.flatbuffers.FloatVector;
    12import com.google.flatbuffers.IntVector;
    13import com.google.flatbuffers.LongVector;
    14import com.google.flatbuffers.ShortVector;
    15import com.google.flatbuffers.StringVector;
    16import com.google.flatbuffers.Struct;
    17import com.google.flatbuffers.Table;
    18import com.google.flatbuffers.UnionVector;
    19import java.nio.ByteBuffer;
    20import java.nio.ByteOrder;
    21
    22public class ArrayTableT {
    23  private MyGame.Example.ArrayStructT a;
    24
    25  public MyGame.Example.ArrayStructT getA() { return a; }
    26
    27  public void setA(MyGame.Example.ArrayStructT a) { this.a = a; }
    28
    29
    30  public ArrayTableT() {
    31    this.a = new MyGame.Example.ArrayStructT();
    32  }
    33  public static ArrayTableT deserializeFromBinary(byte[] fbBuffer) {
    34    return ArrayTable.getRootAsArrayTable(ByteBuffer.wrap(fbBuffer)).unpack();
    35  }
    36  public byte[] serializeToBinary() {
    37    FlatBufferBuilder fbb = new FlatBufferBuilder();
    38    ArrayTable.finishArrayTableBuffer(fbb, ArrayTable.pack(fbb, this));
    39    return fbb.sizedByteArray();
    40  }
    41}
    42

View as plain text