@Override
public void write(ArrayField value, TProtocol protocol)
throws Exception
{
TProtocolWriter writer = new TProtocolWriter(protocol);
writer.writeStructBegin("array");
boolean[] booleanArray = value.booleanArray;
if (booleanArray != null) {
writer.writeBoolArrayField("booleanArray", (short) 1, booleanArray);
}
short[] shortArray = value.shortArray;
if (shortArray != null) {
writer.writeI16ArrayField("shortArray", (short) 2, shortArray);
}
int[] intArray = value.intArray;
if (intArray != null) {
writer.writeI32ArrayField("intArray", (short) 3, intArray);
}
long[] longArray = value.longArray;
if (longArray != null) {
writer.writeI64ArrayField("longArray", (short) 4, longArray);
}
double[] doubleArray = value.doubleArray;
if (doubleArray != null) {
writer.writeDoubleArrayField("doubleArray", (short) 5, doubleArray);
}
byte[] byteArray = value.byteArray;
if (byteArray != null) {
writer.writeBinaryField("byteArray", (short) 6, ByteBuffer.wrap(byteArray));
}
writer.writeStructEnd();
}