static void writeBinaryAnnotations(WriteBuffer buffer, V1Span v1Span, byte[] endpointBytes) {
    int binaryAnnotationCount = v1Span.binaryAnnotations().size();
    ThriftCodec.writeListBegin(buffer, binaryAnnotationCount);
    for (int i = 0; i < binaryAnnotationCount; i++) {
      V1BinaryAnnotation a = v1Span.binaryAnnotations().get(i);
      byte[] ep = a.stringValue() != null ? endpointBytes : legacyEndpointBytes(a.endpoint());
      ThriftBinaryAnnotationWriter.write(a.key(), a.stringValue(), ep, buffer);
    }
  }
This type isn't thread-safe: it re-uses state to avoid re-allocations in conversion loops.
zipkin/src/main/java/zipkin2/internal/V1ThriftSpanWriter.java