public void writeUInt32(int fieldNumber, int value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Integer.toString(value)); }
public void writeSFixed32(int fieldNumber, int value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Integer.toString(value)); }
public void writeFixed64(int fieldNumber, long value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Long.toString(value)); }
public void writeEnum(int fieldNumber, int value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Integer.toString(value)); }
public void writeByteArray(int fieldNumber, byte[] value, boolean repeated) throws IOException { writeB64(schema.getFieldName(fieldNumber), value, 0, value.length, repeated); }
public void writeSInt32(int fieldNumber, int value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Integer.toString(value)); }
public void writeFixed32(int fieldNumber, int value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Integer.toString(value)); }
public void writeBool(int fieldNumber, boolean value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), String.valueOf(value)); }
public void writeInt32(int fieldNumber, int value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Integer.toString(value)); }
public void writeSInt64(int fieldNumber, long value, boolean repeated) throws IOException { write(writer, schema.getFieldName(fieldNumber), Long.toString(value)); }
public void writeByteArray(int fieldNumber, byte[] value, boolean repeated) throws IOException { writeB64Encoded(writer, schema.getFieldName(fieldNumber), value.length == 0 ? EMPTY : B64Code.cencode(value)); }
public static RuntimeException failureOnCompare(Pipe.Schema<?> ps, int fieldNumber) { return new Operation("CAS failed on " + ps.wrappedSchema.messageName() + "::" + ps.wrappedSchema.getFieldName(fieldNumber)); }
public static RuntimeException failureOnValidate(Pipe.Schema<?> ps, int fieldNumber) { return new Validation("Validation failed on " + ps.wrappedSchema.messageName() + "::" + ps.wrappedSchema.getFieldName(fieldNumber)); }
public static RuntimeException invalidOneByteValue(Pipe.Schema<?> ps, int fieldNumber) { return new Validation("Validation failed on " + ps.wrappedSchema.messageName() + "::" + ps.wrappedSchema.getFieldName(fieldNumber) + " (Invalid one-byte value)"); }
public void writeInt64(int fieldNumber, long value, boolean repeated) throws IOException { final String name = schema.getFieldName(fieldNumber); tail = sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByteArray(START_SLASH_TAG, this, sink.writeStrFromLong(value, this, sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByte(START_TAG, this, tail))))))); }
public void writeFloat(int fieldNumber, float value, boolean repeated) throws IOException { final String name = schema.getFieldName(fieldNumber); tail = sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByteArray(START_SLASH_TAG, this, sink.writeStrFromFloat(value, this, sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByte(START_TAG, this, tail))))))); }
public void writeBool(int fieldNumber, boolean value, boolean repeated) throws IOException { final String name = schema.getFieldName(fieldNumber); tail = sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByteArray(START_SLASH_TAG, this, sink.writeByteArray(value ? TRUE : FALSE, this, sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByte(START_TAG, this, tail))))))); }
public void writeString(int fieldNumber, String value, boolean repeated) throws IOException { final String name = schema.getFieldName(fieldNumber); tail = sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByteArray(START_SLASH_TAG, this, sink.writeStrUTF8(value, this, sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByte(START_TAG, this, tail))))))); }
public void writeDouble(int fieldNumber, double value, boolean repeated) throws IOException { final String name = schema.getFieldName(fieldNumber); tail = sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByteArray(START_SLASH_TAG, this, sink.writeStrFromDouble(value, this, sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByte(START_TAG, this, tail))))))); }
public void writeInt32(int fieldNumber, int value, boolean repeated) throws IOException { final String name = schema.getFieldName(fieldNumber); tail = sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByteArray(START_SLASH_TAG, this, sink.writeStrFromInt(value, this, sink.writeByte(END_TAG, this, sink.writeStrAscii(name, this, sink.writeByte(START_TAG, this, tail))))))); }