Class RangedUri


  • @Deprecated
    public final class RangedUri
    extends Object
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Defines a range of data located at a reference uri.
    • Field Detail

      • start

        public final long start
        Deprecated.
        The (zero based) index of the first byte of the range.
      • length

        public final long length
        Deprecated.
        The length of the range, or C.LENGTH_UNSET to indicate that the range is unbounded.
    • Constructor Detail

      • RangedUri

        public RangedUri​(@Nullable
                         String referenceUri,
                         long start,
                         long length)
        Deprecated.
        Constructs an ranged uri.
        Parameters:
        referenceUri - The reference uri.
        start - The (zero based) index of the first byte of the range.
        length - The length of the range, or C.LENGTH_UNSET to indicate that the range is unbounded.
    • Method Detail

      • resolveUri

        public Uri resolveUri​(String baseUri)
        Deprecated.
        Returns the resolved Uri represented by the instance.
        Parameters:
        baseUri - The base Uri.
        Returns:
        The Uri represented by the instance.
      • resolveUriString

        public String resolveUriString​(String baseUri)
        Deprecated.
        Returns the resolved uri represented by the instance as a string.
        Parameters:
        baseUri - The base Uri.
        Returns:
        The uri represented by the instance.
      • attemptMerge

        @Nullable
        public RangedUri attemptMerge​(@Nullable
                                      RangedUri other,
                                      String baseUri)
        Deprecated.
        Attempts to merge this RangedUri with another and an optional common base uri.

        A merge is successful if both instances define the same Uri after resolution with the base uri, and if one starts the byte after the other ends, forming a contiguous region with no overlap.

        If other is null then the merge is considered unsuccessful, and null is returned.

        Parameters:
        other - The RangedUri to merge.
        baseUri - The base Uri.
        Returns:
        The merged RangedUri if the merge was successful. Null otherwise.
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Deprecated.
        Overrides:
        equals in class Object