# SegmentDownloader.Segment

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/offline/SegmentDownloader.java+class:androidx.media3.exoplayer.offline.SegmentDownloader.Segment)

*** ** * ** ***


```
protected class SegmentDownloader.Segment implements Comparable<SegmentDownloader.Segment>
```

<br />

*** ** * ** ***

Smallest unit of content to be downloaded.

## Summary

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/androidx/media3/datasource/DataSpec` | `https://developer.android.com/reference/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#dataSpec()` The `https://developer.android.com/reference/androidx/media3/datasource/DataSpec` of the segment. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#startTimeUs()` The start time of the segment in microseconds. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#Segment(long,androidx.media3.datasource.DataSpec)(long startTimeUs, https://developer.android.com/reference/androidx/media3/datasource/DataSpec dataSpec)` Constructs a Segment. |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/media3/exoplayer/offline/SegmentDownloader.Segment#compareTo(androidx.media3.exoplayer.offline.SegmentDownloader.Segment)(https://developer.android.com/reference/androidx/media3/exoplayer/offline/SegmentDownloader.Segment other)` |

## Public fields

### dataSpec

```
public final DataSpec dataSpec
```

The `https://developer.android.com/reference/androidx/media3/datasource/DataSpec` of the segment.

### startTimeUs

```
public final long startTimeUs
```

The start time of the segment in microseconds.

## Public constructors

### Segment

```
public Segment(long startTimeUs, DataSpec dataSpec)
```

Constructs a Segment.

## Public methods

### compareTo

```
public int compareTo(SegmentDownloader.Segment other)
```