1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 import java.nio.*; 4 import java.lang.*; 5 import java.util.*; 6 import com.google.flatbuffers.*; 7 8 @SuppressWarnings("unused") 9 public final class Movie extends Table { ValidateVersion()10 public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } getRootAsMovie(ByteBuffer _bb)11 public static Movie getRootAsMovie(ByteBuffer _bb) { return getRootAsMovie(_bb, new Movie()); } getRootAsMovie(ByteBuffer _bb, Movie obj)12 public static Movie getRootAsMovie(ByteBuffer _bb, Movie obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } MovieBufferHasIdentifier(ByteBuffer _bb)13 public static boolean MovieBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "MOVI"); } __init(int _i, ByteBuffer _bb)14 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } __assign(int _i, ByteBuffer _bb)15 public Movie __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 16 mainCharacterType()17 public byte mainCharacterType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } mainCharacter(Table obj)18 public Table mainCharacter(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } charactersType(int j)19 public byte charactersType(int j) { int o = __offset(8); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } charactersTypeLength()20 public int charactersTypeLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } charactersTypeVector()21 public ByteVector charactersTypeVector() { return charactersTypeVector(new ByteVector()); } charactersTypeVector(ByteVector obj)22 public ByteVector charactersTypeVector(ByteVector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), bb) : null; } charactersTypeAsByteBuffer()23 public ByteBuffer charactersTypeAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } charactersTypeInByteBuffer(ByteBuffer _bb)24 public ByteBuffer charactersTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } characters(Table obj, int j)25 public Table characters(Table obj, int j) { int o = __offset(10); return o != 0 ? __union(obj, __vector(o) + j * 4) : null; } charactersLength()26 public int charactersLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } charactersVector()27 public UnionVector charactersVector() { return charactersVector(new UnionVector()); } charactersVector(UnionVector obj)28 public UnionVector charactersVector(UnionVector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } 29 createMovie(FlatBufferBuilder builder, byte main_character_type, int main_characterOffset, int characters_typeOffset, int charactersOffset)30 public static int createMovie(FlatBufferBuilder builder, 31 byte main_character_type, 32 int main_characterOffset, 33 int characters_typeOffset, 34 int charactersOffset) { 35 builder.startTable(4); 36 Movie.addCharacters(builder, charactersOffset); 37 Movie.addCharactersType(builder, characters_typeOffset); 38 Movie.addMainCharacter(builder, main_characterOffset); 39 Movie.addMainCharacterType(builder, main_character_type); 40 return Movie.endMovie(builder); 41 } 42 startMovie(FlatBufferBuilder builder)43 public static void startMovie(FlatBufferBuilder builder) { builder.startTable(4); } addMainCharacterType(FlatBufferBuilder builder, byte mainCharacterType)44 public static void addMainCharacterType(FlatBufferBuilder builder, byte mainCharacterType) { builder.addByte(0, mainCharacterType, 0); } addMainCharacter(FlatBufferBuilder builder, int mainCharacterOffset)45 public static void addMainCharacter(FlatBufferBuilder builder, int mainCharacterOffset) { builder.addOffset(1, mainCharacterOffset, 0); } addCharactersType(FlatBufferBuilder builder, int charactersTypeOffset)46 public static void addCharactersType(FlatBufferBuilder builder, int charactersTypeOffset) { builder.addOffset(2, charactersTypeOffset, 0); } createCharactersTypeVector(FlatBufferBuilder builder, byte[] data)47 public static int createCharactersTypeVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } startCharactersTypeVector(FlatBufferBuilder builder, int numElems)48 public static void startCharactersTypeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } addCharacters(FlatBufferBuilder builder, int charactersOffset)49 public static void addCharacters(FlatBufferBuilder builder, int charactersOffset) { builder.addOffset(3, charactersOffset, 0); } createCharactersVector(FlatBufferBuilder builder, int[] data)50 public static int createCharactersVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } startCharactersVector(FlatBufferBuilder builder, int numElems)51 public static void startCharactersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } endMovie(FlatBufferBuilder builder)52 public static int endMovie(FlatBufferBuilder builder) { 53 int o = builder.endTable(); 54 return o; 55 } finishMovieBuffer(FlatBufferBuilder builder, int offset)56 public static void finishMovieBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset, "MOVI"); } finishSizePrefixedMovieBuffer(FlatBufferBuilder builder, int offset)57 public static void finishSizePrefixedMovieBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset, "MOVI"); } 58 59 public static final class Vector extends BaseVector { __assign(int _vector, int _element_size, ByteBuffer _bb)60 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 61 get(int j)62 public Movie get(int j) { return get(new Movie(), j); } get(Movie obj, int j)63 public Movie get(Movie obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 64 } 65 } 66 67