public static TEndPoint deserializeTEndPoint(final InputStream stream) {
    final TEndPoint endPoint = new TEndPoint();
    try {
      endPoint.read(generateReadProtocol(stream));
    } catch (final TException e) {
      throw new ThriftSerDeException("Read TEndPoint failed: ", e);
    }
    return endPoint;
  }
Utils for serialize and deserialize all the data struct defined by thrift-commons
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/ThriftCommonsSerDeUtils.java