@Test public void testSerializedSizeIndexed() { int v = 128; for (int i = 1; i < 5; i++) { assertEquals(i + 1, HeaderSerialization.serializedSize(indexed(v - 1))); assertEquals(i + 2, HeaderSerialization.serializedSize(indexed(v))); v *= 128; } }
public static int serializedSize(BagKey.Indexed bagKey) { return PREFIX_SIZE + UnsignedLexVarint.encodedLength(bagKey.index); }
HeaderSerialization { public static int serializedSize(BagKey.Indexed bagKey) { return PREFIX_SIZE + UnsignedLexVarint.encodedLength(bagKey.index); } }
HeaderSerialization { public static int serializedSize(BagKey.Indexed bagKey) { return PREFIX_SIZE + UnsignedLexVarint.encodedLength(bagKey.index); } private  HeaderSerialization(); }
HeaderSerialization { public static int serializedSize(BagKey.Indexed bagKey) { return PREFIX_SIZE + UnsignedLexVarint.encodedLength(bagKey.index); } private  HeaderSerialization(); static int serializedSize(BagKey.Indexed bagKey); static int serializedSize(BagKey.Keyed bagKey); static void writeAtom(ByteBuffer buf, BagKey.Indexed bagKey, int level); static void writeAtom(ByteBuffer buf, BagKey.Keyed bagKey, int level); static void writeAtomPrefix(ByteBuffer buf, BagKey.Indexed bagKey, int level); static void writeAtomPrefix(ByteBuffer buf, BagKey.Keyed bagKey, int level); static void writeAtomPayload(ByteBuffer buf, BagKey.Indexed bagKey); static void writeAtomPayload(ByteBuffer buf, BagKey.Keyed bagKey); static ByteBuffer serialize(BagKey bagKey, int level); static ByteBuffer serialize(BagKey.Indexed bagKey, int level); static ByteBuffer serialize(BagKey.Keyed bagKey, int level); static ByteBuffer serializePayload(BagKey.Indexed bagKey); static ByteBuffer serializePayload(BagKey.Keyed bagKey); static BagKey parse(ByteBuffer atom); static BagKey parse(HeaderPrefix prefix, ByteBuffer buf); static BagKey parseIndexedHeaderPayload(HeaderPrefix prefix, ByteBuffer buf); static BagKey parseKeyedHeaderPayload(HeaderPrefix prefix, ByteBuffer buf); }
HeaderSerialization { public static int serializedSize(BagKey.Indexed bagKey) { return PREFIX_SIZE + UnsignedLexVarint.encodedLength(bagKey.index); } private  HeaderSerialization(); static int serializedSize(BagKey.Indexed bagKey); static int serializedSize(BagKey.Keyed bagKey); static void writeAtom(ByteBuffer buf, BagKey.Indexed bagKey, int level); static void writeAtom(ByteBuffer buf, BagKey.Keyed bagKey, int level); static void writeAtomPrefix(ByteBuffer buf, BagKey.Indexed bagKey, int level); static void writeAtomPrefix(ByteBuffer buf, BagKey.Keyed bagKey, int level); static void writeAtomPayload(ByteBuffer buf, BagKey.Indexed bagKey); static void writeAtomPayload(ByteBuffer buf, BagKey.Keyed bagKey); static ByteBuffer serialize(BagKey bagKey, int level); static ByteBuffer serialize(BagKey.Indexed bagKey, int level); static ByteBuffer serialize(BagKey.Keyed bagKey, int level); static ByteBuffer serializePayload(BagKey.Indexed bagKey); static ByteBuffer serializePayload(BagKey.Keyed bagKey); static BagKey parse(ByteBuffer atom); static BagKey parse(HeaderPrefix prefix, ByteBuffer buf); static BagKey parseIndexedHeaderPayload(HeaderPrefix prefix, ByteBuffer buf); static BagKey parseKeyedHeaderPayload(HeaderPrefix prefix, ByteBuffer buf); static final int PREFIX_SIZE; }