static byte[] legacyEndpointBytes(@Nullable Endpoint localEndpoint) {
    if (localEndpoint == null) return null;
    byte[] result = new byte[ThriftEndpointCodec.sizeInBytes(localEndpoint)];
    ThriftEndpointCodec.write(localEndpoint, WriteBuffer.wrap(result));
    return result;
  }
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