docs/doc/reference/com/google/android/exoplayer2/upstream/HttpUtil.html
Package com.google.android.exoplayer2.upstream
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classHttpUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
Utility methods for HTTP.
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static String | buildRangeRequestHeader(long position, long length) |
Deprecated.
Builds a Range header for the given position and length.
|
| static long | getContentLength(String contentLengthHeader, String contentRangeHeader) |
Deprecated.
Attempts to parse the length of a response body from the corresponding response headers.
|
| static long | getDocumentSize(String contentRangeHeader) |
Deprecated.
Attempts to parse the document size from a Content-Range header.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
@Nullable
public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")buildRangeRequestHeader(long position,
long length)
Deprecated.
Builds a Range header for the given position and length.
Parameters:position - The request position.length - The request length, or C.LENGTH_UNSET if the request is unbounded.Returns:The corresponding range header, or null if a header is unnecessary because the whole resource is being requested.
-
public static long getDocumentSize(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")contentRangeHeader)
Deprecated.
Attempts to parse the document size from a Content-Range header.
Parameters:contentRangeHeader - The Content-Range header, or null if not set.Returns:The document size, or C.LENGTH_UNSET if it could not be determined.
-
public static long getContentLength(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")contentLengthHeader,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")contentRangeHeader)
Deprecated.
Attempts to parse the length of a response body from the corresponding response headers.
Parameters:contentLengthHeader - The Content-Length header, or null if not set.contentRangeHeader - The Content-Range header, or null if not set.Returns:The length of the response body, or C.LENGTH_UNSET if it could not be determined.