Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [S Extensions 22](https://developer.android.com/sdkExtensions) Summary: [Methods](https://developer.android.com/reference/android/net/dns/HttpsEndpoint#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/dns/HttpsEndpoint#inhmethods)

# HttpsEndpoint

*** ** * ** ***

` public class HttpsEndpoint `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.dns.HttpsEndpoint |

<br />

*** ** * ** ***

Class that contains the DNS records needed to connect to an HTTPS endpoint.

This includes the data from A/AAAA and HTTPS DNS queries. The response from the HTTPS query is represented as a list of `https://developer.android.com/reference/android/net/dns/HttpsRecord` sorted by SvcPriority.

This class also contains a list of `https://developer.android.com/reference/java/net/InetAddress`, with RFC 6724 sorting. IPv4 addresses are included if the `https://developer.android.com/reference/android/net/Network` provides IPv4 connectivity, and IPv6 addresses if it provides IPv6 connectivity. This list will come from the hints in the HTTPS record and/or from the responses of the A/AAAA queries.

## Summary

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/dns/HttpsRecord>` | ` https://developer.android.com/reference/android/net/dns/HttpsEndpoint#getHttpsRecords()() ` Returns the list of `https://developer.android.com/reference/android/net/dns/HttpsRecord` from the HTTPS DNS query, sorted by priority. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/net/InetAddress>` | ` https://developer.android.com/reference/android/net/dns/HttpsEndpoint#getIpAddresses()() ` Returns the list of IP addresses from the A/AAAA/HTTPS queries. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### getHttpsRecords

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [S Extensions 22](https://developer.android.com/sdkExtensions)

```
public List<HttpsRecord> getHttpsRecords ()
```

Returns the list of `https://developer.android.com/reference/android/net/dns/HttpsRecord` from the HTTPS DNS query, sorted by priority.

This list is empty if the HTTPS DNS query did not return any data, or if the HTTPS query did not return within the specified timeout.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/dns/HttpsRecord>` | This value cannot be `null`. <br /> |

### getIpAddresses

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [S Extensions 22](https://developer.android.com/sdkExtensions)

```
public List<InetAddress> getIpAddresses ()
```

Returns the list of IP addresses from the A/AAAA/HTTPS queries.

If the HTTPS query returned first, this list contains the IP hints from the HTTPS record, if present. Otherwise, this list contains the IP addresses returned from the A/AAAA queries and the HTTPS query, only if the HTTPS query returned within the specified timeout.

This list contains only IP addresses of the address families present on the specified `https://developer.android.com/reference/android/net/Network`, and is sorted according to RFC 6724 if the caller has `INTERNET` permission.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/net/InetAddress>` | This value cannot be `null`. <br /> |