public void writeTo(Output output, Fixed64Op message) throws IOException { if(message.f == 0) throw new UninitializedMessageException(message); output.writeUInt32(1, message.f, false); if(message.c != 0) output.writeFixed64(2, message.c, false); if(message.s != 0) output.writeFixed64(3, message.s, false); if(message.o != null && message.o != Operator.EQ) output.writeEnum(4, message.o.number, false); if(message.i) output.writeBool(5, true, false); }
protected Input begin(Schema<?> pipeSchema) throws IOException { if (em == null) return protostuffInput; int offset; byte[] key = this.key; if (key == null) { // the key is right after the value offset = voffset + vlen; key = v(); } else { offset = key.length - 9; } output.writeByteRange(false, 1, key, offset, 9, false); if (!em.seq) output.writeFixed64(2, KeyUtil.readTimestamp(key, offset + 1), false); return protostuffInput; }