• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 {
getRootAsMovie(ByteBuffer _bb)10   public static Movie getRootAsMovie(ByteBuffer _bb) { return getRootAsMovie(_bb, new Movie()); }
getRootAsMovie(ByteBuffer _bb, Movie obj)11   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)12   public static boolean MovieBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "MOVI"); }
__init(int _i, ByteBuffer _bb)13   public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
__assign(int _i, ByteBuffer _bb)14   public Movie __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
15 
mainCharacterType()16   public byte mainCharacterType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
mutateMainCharacterType(byte main_character_type)17   public boolean mutateMainCharacterType(byte main_character_type) { int o = __offset(4); if (o != 0) { bb.put(o + bb_pos, main_character_type); return true; } else { return false; } }
mainCharacter(Table obj)18   public Table mainCharacter(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o) : 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; }
charactersTypeAsByteBuffer()21   public ByteBuffer charactersTypeAsByteBuffer() { return __vector_as_bytebuffer(8, 1); }
charactersTypeInByteBuffer(ByteBuffer _bb)22   public ByteBuffer charactersTypeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); }
mutateCharactersType(int j, byte characters_type)23   public boolean mutateCharactersType(int j, byte characters_type) { int o = __offset(8); if (o != 0) { bb.put(__vector(o) + j * 1, characters_type); return true; } else { return false; } }
characters(Table obj, int j)24   public Table characters(Table obj, int j) { int o = __offset(10); return o != 0 ? __union(obj, __vector(o) + j * 4 - bb_pos) : null; }
charactersLength()25   public int charactersLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; }
26 
createMovie(FlatBufferBuilder builder, byte main_character_type, int main_characterOffset, int characters_typeOffset, int charactersOffset)27   public static int createMovie(FlatBufferBuilder builder,
28       byte main_character_type,
29       int main_characterOffset,
30       int characters_typeOffset,
31       int charactersOffset) {
32     builder.startObject(4);
33     Movie.addCharacters(builder, charactersOffset);
34     Movie.addCharactersType(builder, characters_typeOffset);
35     Movie.addMainCharacter(builder, main_characterOffset);
36     Movie.addMainCharacterType(builder, main_character_type);
37     return Movie.endMovie(builder);
38   }
39 
startMovie(FlatBufferBuilder builder)40   public static void startMovie(FlatBufferBuilder builder) { builder.startObject(4); }
addMainCharacterType(FlatBufferBuilder builder, byte mainCharacterType)41   public static void addMainCharacterType(FlatBufferBuilder builder, byte mainCharacterType) { builder.addByte(0, mainCharacterType, 0); }
addMainCharacter(FlatBufferBuilder builder, int mainCharacterOffset)42   public static void addMainCharacter(FlatBufferBuilder builder, int mainCharacterOffset) { builder.addOffset(1, mainCharacterOffset, 0); }
addCharactersType(FlatBufferBuilder builder, int charactersTypeOffset)43   public static void addCharactersType(FlatBufferBuilder builder, int charactersTypeOffset) { builder.addOffset(2, charactersTypeOffset, 0); }
createCharactersTypeVector(FlatBufferBuilder builder, byte[] data)44   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)45   public static void startCharactersTypeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
addCharacters(FlatBufferBuilder builder, int charactersOffset)46   public static void addCharacters(FlatBufferBuilder builder, int charactersOffset) { builder.addOffset(3, charactersOffset, 0); }
createCharactersVector(FlatBufferBuilder builder, int[] data)47   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)48   public static void startCharactersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
endMovie(FlatBufferBuilder builder)49   public static int endMovie(FlatBufferBuilder builder) {
50     int o = builder.endObject();
51     return o;
52   }
finishMovieBuffer(FlatBufferBuilder builder, int offset)53   public static void finishMovieBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset, "MOVI"); }
finishSizePrefixedMovieBuffer(FlatBufferBuilder builder, int offset)54   public static void finishSizePrefixedMovieBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset, "MOVI"); }
55 }
56 
57