media/docs/doc/reference-v1/com/google/android/exoplayer/util/Util.html
2021-04-20 17:32:19 +01:00

1436 lines
86 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_101) on Wed Dec 14 17:18:29 GMT 2016 -->
<title>Util (ExoPlayer library)</title>
<meta name="date" content="2016-12-14">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Util (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/google/android/exoplayer/util/UriUtil.html" title="class in com.google.android.exoplayer.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/google/android/exoplayer/util/VerboseLogUtil.html" title="class in com.google.android.exoplayer.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/android/exoplayer/util/Util.html" target="_top">Frames</a></li>
<li><a href="Util.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.google.android.exoplayer.util</div>
<h2 title="Class Util" class="title">Class Util</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer.util.Util</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">Util</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Miscellaneous utility functions.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#DEVICE">DEVICE</a></span></code>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html?is-external=true#DEVICE" title="class or interface in android.os"><code>Build.DEVICE</code></a>, but in a place where it can be conveniently overridden for local
testing.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#MANUFACTURER">MANUFACTURER</a></span></code>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html?is-external=true#MANUFACTURER" title="class or interface in android.os"><code>Build.MANUFACTURER</code></a>, but in a place where it can be conveniently overridden for
local testing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#MODEL">MODEL</a></span></code>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html?is-external=true#MODEL" title="class or interface in android.os"><code>Build.MODEL</code></a>, but in a place where it can be conveniently overridden for local
testing.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#SDK_INT">SDK_INT</a></span></code>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.VERSION.html?is-external=true#SDK_INT" title="class or interface in android.os"><code>Build.VERSION.SDK_INT</code></a>, but in a place where it can be conveniently
overridden for local testing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_DASH">TYPE_DASH</a></span></code>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for DASH manifests.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_HLS">TYPE_HLS</a></span></code>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for HLS manifests.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_OTHER">TYPE_OTHER</a></span></code>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for files other than DASH, HLS or Smooth
Streaming manifests.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_SS">TYPE_SS</a></span></code>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for Smooth Streaming manifests.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#areEqual-java.lang.Object-java.lang.Object-">areEqual</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o1,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o2)</code>
<div class="block">Tests two objects for <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a> equality, handling the case where one or
both may be null.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#binarySearchCeil-java.util.List-T-boolean-boolean-">binarySearchCeil</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;? super T&gt;&gt;&nbsp;list,
T&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</code>
<div class="block">Returns the index of the smallest value in an list that is greater than (or optionally equal
to) a specified key.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#binarySearchCeil-long:A-long-boolean-boolean-">binarySearchCeil</a></span>(long[]&nbsp;a,
long&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</code>
<div class="block">Returns the index of the smallest value in an array that is greater than (or optionally equal
to) a specified key.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#binarySearchFloor-java.util.List-T-boolean-boolean-">binarySearchFloor</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;? super T&gt;&gt;&nbsp;list,
T&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</code>
<div class="block">Returns the index of the largest value in an list that is less than (or optionally equal to)
a specified key.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#binarySearchFloor-long:A-long-boolean-boolean-">binarySearchFloor</a></span>(long[]&nbsp;a,
long&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</code>
<div class="block">Returns the index of the largest value in an array that is less than (or optionally equal to)
a specified key.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#ceilDivide-int-int-">ceilDivide</a></span>(int&nbsp;numerator,
int&nbsp;denominator)</code>
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#ceilDivide-long-long-">ceilDivide</a></span>(long&nbsp;numerator,
long&nbsp;denominator)</code>
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#closeQuietly-java.io.Closeable-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</code>
<div class="block">Closes a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a>, suppressing any <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a> that may occur.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#closeQuietly-com.google.android.exoplayer.upstream.DataSource-">closeQuietly</a></span>(<a href="../../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a>&nbsp;dataSource)</code>
<div class="block">Closes a <a href="../../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream"><code>DataSource</code></a>, suppressing any <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a> that may occur.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#contains-java.lang.Object:A-java.lang.Object-">contains</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;items,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;item)</code>
<div class="block">Tests whether an <code>items</code> array contains an object equal to <code>item</code>, according to
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#crc-byte:A-int-int-int-">crc</a></span>(byte[]&nbsp;bytes,
int&nbsp;start,
int&nbsp;end,
int&nbsp;initialValue)</code>
<div class="block">Returns the result of updating a CRC with the specified bytes in a "most significant bit first"
order.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#escapeFileName-java.lang.String-">escapeFileName</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fileName)</code>
<div class="block">Escapes a string so that it's safe for use as a file or directory name on at least FAT32
filesystems.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#executePost-java.lang.String-byte:A-java.util.Map-">executePost</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
byte[]&nbsp;data,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;requestProperties)</code>
<div class="block">Executes a post request using <a href="http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net"><code>HttpURLConnection</code></a>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#firstIntegersArray-int-">firstIntegersArray</a></span>(int&nbsp;length)</code>
<div class="block">Creates an integer array containing the integers from 0 to <code>length - 1</code>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getBottomInt-long-">getBottomInt</a></span>(long&nbsp;value)</code>
<div class="block">Returns the bottom 32 bits of a long as an integer.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getBytesFromHexString-java.lang.String-">getBytesFromHexString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hexString)</code>
<div class="block">Returns a byte array containing values parsed from the hex string provided.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getCommaDelimitedSimpleClassNames-T:A-">getCommaDelimitedSimpleClassNames</a></span>(T[]&nbsp;objects)</code>
<div class="block">Returns a string with comma delimited simple names of each object's class.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getHexStringFromBytes-byte:A-int-int-">getHexStringFromBytes</a></span>(byte[]&nbsp;data,
int&nbsp;beginIndex,
int&nbsp;endIndex)</code>
<div class="block">Returns a hex string representation of the data provided.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getIntegerCodeForString-java.lang.String-">getIntegerCodeForString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;string)</code>
<div class="block">Returns the integer equal to the big-endian concatenation of the characters in <code>string</code>
as bytes.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getLong-int-int-">getLong</a></span>(int&nbsp;topInteger,
int&nbsp;bottomInteger)</code>
<div class="block">Returns a long created by concatenating the bits of two integers.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getPcmEncoding-int-">getPcmEncoding</a></span>(int&nbsp;bitDepth)</code>
<div class="block">Converts a sample bit depth to a corresponding PCM encoding constant.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/graphics/Point.html?is-external=true" title="class or interface in android.graphics">Point</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getPhysicalDisplaySize-android.content.Context-">getPhysicalDisplaySize</a></span>(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context)</code>
<div class="block">Gets the physical size of the default display, in pixels.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream">DataSpec</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getRemainderDataSpec-com.google.android.exoplayer.upstream.DataSpec-int-">getRemainderDataSpec</a></span>(<a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream">DataSpec</a>&nbsp;dataSpec,
int&nbsp;bytesLoaded)</code>
<div class="block">Given a <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream"><code>DataSpec</code></a> and a number of bytes already loaded, returns a <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream"><code>DataSpec</code></a>
that represents the remainder of the data.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getTopInt-long-">getTopInt</a></span>(long&nbsp;value)</code>
<div class="block">Returns the top 32 bits of a long as an integer.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#getUserAgent-android.content.Context-java.lang.String-">getUserAgent</a></span>(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;applicationName)</code>
<div class="block">Returns a user agent string based on the given application name and the library version.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-">inferContentType</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fileName)</code>
<div class="block">Makes a best guess to infer the type from a file name.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#isAndroidTv-android.content.Context-">isAndroidTv</a></span>(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context)</code>
<div class="block">Returns whether the device is an AndroidTV.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#isLocalFileUri-android.net.Uri-">isLocalFileUri</a></span>(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&nbsp;uri)</code>
<div class="block">Returns true if the URI is a path to a local file or a reference to a local file.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#maybeTerminateInputStream-java.net.HttpURLConnection-long-">maybeTerminateInputStream</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;connection,
long&nbsp;bytesRemaining)</code>
<div class="block">On platform API levels 19 and 20, okhttp's implementation of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#close--" title="class or interface in java.io"><code>InputStream.close()</code></a> can
block for a long time if the stream has a lot of data remaining.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ExecutorService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#newSingleThreadExecutor-java.lang.String-">newSingleThreadExecutor</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;threadName)</code>
<div class="block">Instantiates a new single threaded executor whose thread has the specified name.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ScheduledExecutorService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#newSingleThreadScheduledExecutor-java.lang.String-">newSingleThreadScheduledExecutor</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;threadName)</code>
<div class="block">Instantiates a new single threaded scheduled executor whose thread has the specified name.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#parseXsDateTime-java.lang.String-">parseXsDateTime</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Parses an xs:dateTime attribute value, returning the parsed timestamp in milliseconds since
the epoch.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#parseXsDuration-java.lang.String-">parseXsDuration</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Parses an xs:duration attribute value, returning the parsed duration in milliseconds.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestamp-long-long-long-">scaleLargeTimestamp</a></span>(long&nbsp;timestamp,
long&nbsp;multiplier,
long&nbsp;divisor)</code>
<div class="block">Scales a large timestamp.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>static long[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestamps-java.util.List-long-long-">scaleLargeTimestamps</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;timestamps,
long&nbsp;multiplier,
long&nbsp;divisor)</code>
<div class="block">Applies <a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestamp-long-long-long-"><code>scaleLargeTimestamp(long, long, long)</code></a> to a list of unscaled timestamps.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestampsInPlace-long:A-long-long-">scaleLargeTimestampsInPlace</a></span>(long[]&nbsp;timestamps,
long&nbsp;multiplier,
long&nbsp;divisor)</code>
<div class="block">Applies <a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestamp-long-long-long-"><code>scaleLargeTimestamp(long, long, long)</code></a> to an array of unscaled timestamps.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#sneakyThrow-java.lang.Throwable-">sneakyThrow</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;t)</code>
<div class="block">A hacky method that always throws <code>t</code> even if <code>t</code> is a checked exception,
and is not declared to be thrown.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#toArray-java.util.List-">toArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;list)</code>
<div class="block">Converts a list of integers to a primitive array.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#toByteArray-java.io.InputStream-">toByteArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)</code>
<div class="block">Converts the entirety of an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> to a byte array.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#toLowerInvariant-java.lang.String-">toLowerInvariant</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)</code>
<div class="block">Converts text to lower case using <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true#US" title="class or interface in java.util"><code>Locale.US</code></a>.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer/util/Util.html#unescapeFileName-java.lang.String-">unescapeFileName</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fileName)</code>
<div class="block">Unescapes an escaped file or directory name back to its original value.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="SDK_INT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SDK_INT</h4>
<pre>public static final&nbsp;int SDK_INT</pre>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.VERSION.html?is-external=true#SDK_INT" title="class or interface in android.os"><code>Build.VERSION.SDK_INT</code></a>, but in a place where it can be conveniently
overridden for local testing.</div>
</li>
</ul>
<a name="DEVICE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEVICE</h4>
<pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEVICE</pre>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html?is-external=true#DEVICE" title="class or interface in android.os"><code>Build.DEVICE</code></a>, but in a place where it can be conveniently overridden for local
testing.</div>
</li>
</ul>
<a name="MANUFACTURER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MANUFACTURER</h4>
<pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MANUFACTURER</pre>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html?is-external=true#MANUFACTURER" title="class or interface in android.os"><code>Build.MANUFACTURER</code></a>, but in a place where it can be conveniently overridden for
local testing.</div>
</li>
</ul>
<a name="MODEL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MODEL</h4>
<pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> MODEL</pre>
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html?is-external=true#MODEL" title="class or interface in android.os"><code>Build.MODEL</code></a>, but in a place where it can be conveniently overridden for local
testing.</div>
</li>
</ul>
<a name="TYPE_DASH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TYPE_DASH</h4>
<pre>public static final&nbsp;int TYPE_DASH</pre>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for DASH manifests.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer.util.Util.TYPE_DASH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="TYPE_SS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TYPE_SS</h4>
<pre>public static final&nbsp;int TYPE_SS</pre>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for Smooth Streaming manifests.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer.util.Util.TYPE_SS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="TYPE_HLS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TYPE_HLS</h4>
<pre>public static final&nbsp;int TYPE_HLS</pre>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for HLS manifests.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer.util.Util.TYPE_HLS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="TYPE_OTHER">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TYPE_OTHER</h4>
<pre>public static final&nbsp;int TYPE_OTHER</pre>
<div class="block">Value returned by <a href="../../../../../com/google/android/exoplayer/util/Util.html#inferContentType-java.lang.String-"><code>inferContentType(String)</code></a> for files other than DASH, HLS or Smooth
Streaming manifests.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer.util.Util.TYPE_OTHER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isAndroidTv-android.content.Context-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAndroidTv</h4>
<pre>public static&nbsp;boolean&nbsp;isAndroidTv(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context)</pre>
<div class="block">Returns whether the device is an AndroidTV.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if the device is an AndroidTV. False otherwise.</dd>
</dl>
</li>
</ul>
<a name="toByteArray-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;toByteArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;inputStream)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Converts the entirety of an <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> to a byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - the <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> to be read. The input stream is not closed by this
method.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a byte array containing all of the inputStream's bytes.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs reading from the stream.</dd>
</dl>
</li>
</ul>
<a name="isLocalFileUri-android.net.Uri-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLocalFileUri</h4>
<pre>public static&nbsp;boolean&nbsp;isLocalFileUri(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&nbsp;uri)</pre>
<div class="block">Returns true if the URI is a path to a local file or a reference to a local file.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - The uri to test.</dd>
</dl>
</li>
</ul>
<a name="areEqual-java.lang.Object-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>areEqual</h4>
<pre>public static&nbsp;boolean&nbsp;areEqual(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o1,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o2)</pre>
<div class="block">Tests two objects for <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a> equality, handling the case where one or
both may be null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>o1</code> - The first object.</dd>
<dd><code>o2</code> - The second object.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>o1 == null ? o2 == null : o1.equals(o2)</code>.</dd>
</dl>
</li>
</ul>
<a name="contains-java.lang.Object:A-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public static&nbsp;boolean&nbsp;contains(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;items,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;item)</pre>
<div class="block">Tests whether an <code>items</code> array contains an object equal to <code>item</code>, according to
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a>.
<p>
If <code>item</code> is null then true is returned if and only if <code>items</code> contains null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>items</code> - The array of items to search.</dd>
<dd><code>item</code> - The item to search for.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if the array contains an object equal to the item being searched for.</dd>
</dl>
</li>
</ul>
<a name="newSingleThreadExecutor-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newSingleThreadExecutor</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ExecutorService</a>&nbsp;newSingleThreadExecutor(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;threadName)</pre>
<div class="block">Instantiates a new single threaded executor whose thread has the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>threadName</code> - The name of the thread.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The executor.</dd>
</dl>
</li>
</ul>
<a name="newSingleThreadScheduledExecutor-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newSingleThreadScheduledExecutor</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ScheduledExecutorService</a>&nbsp;newSingleThreadScheduledExecutor(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;threadName)</pre>
<div class="block">Instantiates a new single threaded scheduled executor whose thread has the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>threadName</code> - The name of the thread.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The executor.</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-com.google.android.exoplayer.upstream.DataSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="../../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream">DataSource</a>&nbsp;dataSource)</pre>
<div class="block">Closes a <a href="../../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream"><code>DataSource</code></a>, suppressing any <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a> that may occur.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dataSource</code> - The <a href="../../../../../com/google/android/exoplayer/upstream/DataSource.html" title="interface in com.google.android.exoplayer.upstream"><code>DataSource</code></a> to close.</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Closeable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static&nbsp;void&nbsp;closeQuietly(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>&nbsp;closeable)</pre>
<div class="block">Closes a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a>, suppressing any <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a> that may occur. Both <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><code>OutputStream</code></a> and <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> are <code>Closeable</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>closeable</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> to close.</dd>
</dl>
</li>
</ul>
<a name="toLowerInvariant-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLowerInvariant</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toLowerInvariant(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)</pre>
<div class="block">Converts text to lower case using <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true#US" title="class or interface in java.util"><code>Locale.US</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - The text to convert.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The lower case text, or null if <code>text</code> is null.</dd>
</dl>
</li>
</ul>
<a name="ceilDivide-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ceilDivide</h4>
<pre>public static&nbsp;int&nbsp;ceilDivide(int&nbsp;numerator,
int&nbsp;denominator)</pre>
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>numerator</code> - The numerator to divide.</dd>
<dd><code>denominator</code> - The denominator to divide by.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The ceiled result of the division.</dd>
</dl>
</li>
</ul>
<a name="ceilDivide-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ceilDivide</h4>
<pre>public static&nbsp;long&nbsp;ceilDivide(long&nbsp;numerator,
long&nbsp;denominator)</pre>
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>numerator</code> - The numerator to divide.</dd>
<dd><code>denominator</code> - The denominator to divide by.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The ceiled result of the division.</dd>
</dl>
</li>
</ul>
<a name="binarySearchFloor-long:A-long-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binarySearchFloor</h4>
<pre>public static&nbsp;int&nbsp;binarySearchFloor(long[]&nbsp;a,
long&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</pre>
<div class="block">Returns the index of the largest value in an array that is less than (or optionally equal to)
a specified key.
<p>
The search is performed using a binary search algorithm, and so the array must be sorted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - The array to search.</dd>
<dd><code>key</code> - The key being searched for.</dd>
<dd><code>inclusive</code> - If the key is present in the array, whether to return the corresponding index.
If false then the returned index corresponds to the largest value in the array that is
strictly less than the key.</dd>
<dd><code>stayInBounds</code> - If true, then 0 will be returned in the case that the key is smaller than
the smallest value in the array. If false then -1 will be returned.</dd>
</dl>
</li>
</ul>
<a name="binarySearchCeil-long:A-long-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binarySearchCeil</h4>
<pre>public static&nbsp;int&nbsp;binarySearchCeil(long[]&nbsp;a,
long&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</pre>
<div class="block">Returns the index of the smallest value in an array that is greater than (or optionally equal
to) a specified key.
<p>
The search is performed using a binary search algorithm, and so the array must be sorted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - The array to search.</dd>
<dd><code>key</code> - The key being searched for.</dd>
<dd><code>inclusive</code> - If the key is present in the array, whether to return the corresponding index.
If false then the returned index corresponds to the smallest value in the array that is
strictly greater than the key.</dd>
<dd><code>stayInBounds</code> - If true, then <code>(a.length - 1)</code> will be returned in the case that the
key is greater than the largest value in the array. If false then <code>a.length</code> will be
returned.</dd>
</dl>
</li>
</ul>
<a name="binarySearchFloor-java.util.List-java.lang.Object-boolean-boolean-">
<!-- -->
</a><a name="binarySearchFloor-java.util.List-T-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binarySearchFloor</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;int&nbsp;binarySearchFloor(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;? super T&gt;&gt;&nbsp;list,
T&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</pre>
<div class="block">Returns the index of the largest value in an list that is less than (or optionally equal to)
a specified key.
<p>
The search is performed using a binary search algorithm, and so the list must be sorted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>list</code> - The list to search.</dd>
<dd><code>key</code> - The key being searched for.</dd>
<dd><code>inclusive</code> - If the key is present in the list, whether to return the corresponding index.
If false then the returned index corresponds to the largest value in the list that is
strictly less than the key.</dd>
<dd><code>stayInBounds</code> - If true, then 0 will be returned in the case that the key is smaller than
the smallest value in the list. If false then -1 will be returned.</dd>
</dl>
</li>
</ul>
<a name="binarySearchCeil-java.util.List-java.lang.Object-boolean-boolean-">
<!-- -->
</a><a name="binarySearchCeil-java.util.List-T-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binarySearchCeil</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;int&nbsp;binarySearchCeil(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;? super T&gt;&gt;&nbsp;list,
T&nbsp;key,
boolean&nbsp;inclusive,
boolean&nbsp;stayInBounds)</pre>
<div class="block">Returns the index of the smallest value in an list that is greater than (or optionally equal
to) a specified key.
<p>
The search is performed using a binary search algorithm, and so the list must be sorted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>list</code> - The list to search.</dd>
<dd><code>key</code> - The key being searched for.</dd>
<dd><code>inclusive</code> - If the key is present in the list, whether to return the corresponding index.
If false then the returned index corresponds to the smallest value in the list that is
strictly greater than the key.</dd>
<dd><code>stayInBounds</code> - If true, then <code>(list.size() - 1)</code> will be returned in the case that
the key is greater than the largest value in the list. If false then <code>list.size()</code>
will be returned.</dd>
</dl>
</li>
</ul>
<a name="firstIntegersArray-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>firstIntegersArray</h4>
<pre>public static&nbsp;int[]&nbsp;firstIntegersArray(int&nbsp;length)</pre>
<div class="block">Creates an integer array containing the integers from 0 to <code>length - 1</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>length</code> - The length of the array.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The array.</dd>
</dl>
</li>
</ul>
<a name="parseXsDuration-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseXsDuration</h4>
<pre>public static&nbsp;long&nbsp;parseXsDuration(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block">Parses an xs:duration attribute value, returning the parsed duration in milliseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The attribute value to parse.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The parsed duration in milliseconds.</dd>
</dl>
</li>
</ul>
<a name="parseXsDateTime-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseXsDateTime</h4>
<pre>public static&nbsp;long&nbsp;parseXsDateTime(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></pre>
<div class="block">Parses an xs:dateTime attribute value, returning the parsed timestamp in milliseconds since
the epoch.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The attribute value to parse.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The parsed timestamp in milliseconds since the epoch.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/text/ParseException.html?is-external=true" title="class or interface in java.text">ParseException</a></code></dd>
</dl>
</li>
</ul>
<a name="scaleLargeTimestamp-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scaleLargeTimestamp</h4>
<pre>public static&nbsp;long&nbsp;scaleLargeTimestamp(long&nbsp;timestamp,
long&nbsp;multiplier,
long&nbsp;divisor)</pre>
<div class="block">Scales a large timestamp.
<p>
Logically, scaling consists of a multiplication followed by a division. The actual operations
performed are designed to minimize the probability of overflow.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timestamp</code> - The timestamp to scale.</dd>
<dd><code>multiplier</code> - The multiplier.</dd>
<dd><code>divisor</code> - The divisor.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The scaled timestamp.</dd>
</dl>
</li>
</ul>
<a name="scaleLargeTimestamps-java.util.List-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scaleLargeTimestamps</h4>
<pre>public static&nbsp;long[]&nbsp;scaleLargeTimestamps(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;timestamps,
long&nbsp;multiplier,
long&nbsp;divisor)</pre>
<div class="block">Applies <a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestamp-long-long-long-"><code>scaleLargeTimestamp(long, long, long)</code></a> to a list of unscaled timestamps.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timestamps</code> - The timestamps to scale.</dd>
<dd><code>multiplier</code> - The multiplier.</dd>
<dd><code>divisor</code> - The divisor.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The scaled timestamps.</dd>
</dl>
</li>
</ul>
<a name="scaleLargeTimestampsInPlace-long:A-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scaleLargeTimestampsInPlace</h4>
<pre>public static&nbsp;void&nbsp;scaleLargeTimestampsInPlace(long[]&nbsp;timestamps,
long&nbsp;multiplier,
long&nbsp;divisor)</pre>
<div class="block">Applies <a href="../../../../../com/google/android/exoplayer/util/Util.html#scaleLargeTimestamp-long-long-long-"><code>scaleLargeTimestamp(long, long, long)</code></a> to an array of unscaled timestamps.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timestamps</code> - The timestamps to scale.</dd>
<dd><code>multiplier</code> - The multiplier.</dd>
<dd><code>divisor</code> - The divisor.</dd>
</dl>
</li>
</ul>
<a name="toArray-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toArray</h4>
<pre>public static&nbsp;int[]&nbsp;toArray(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;list)</pre>
<div class="block">Converts a list of integers to a primitive array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>list</code> - A list of integers.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list in array form, or null if the input list was null.</dd>
</dl>
</li>
</ul>
<a name="maybeTerminateInputStream-java.net.HttpURLConnection-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeTerminateInputStream</h4>
<pre>public static&nbsp;void&nbsp;maybeTerminateInputStream(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net">HttpURLConnection</a>&nbsp;connection,
long&nbsp;bytesRemaining)</pre>
<div class="block">On platform API levels 19 and 20, okhttp's implementation of <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#close--" title="class or interface in java.io"><code>InputStream.close()</code></a> can
block for a long time if the stream has a lot of data remaining. Call this method before
closing the input stream to make a best effort to cause the input stream to encounter an
unexpected end of input, working around this issue. On other platform API levels, the method
does nothing.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>connection</code> - The connection whose <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> should be terminated.</dd>
<dd><code>bytesRemaining</code> - The number of bytes remaining to be read from the input stream if its
length is known. <a href="../../../../../com/google/android/exoplayer/C.html#LENGTH_UNBOUNDED"><code>C.LENGTH_UNBOUNDED</code></a> otherwise.</dd>
</dl>
</li>
</ul>
<a name="getRemainderDataSpec-com.google.android.exoplayer.upstream.DataSpec-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemainderDataSpec</h4>
<pre>public static&nbsp;<a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream">DataSpec</a>&nbsp;getRemainderDataSpec(<a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream">DataSpec</a>&nbsp;dataSpec,
int&nbsp;bytesLoaded)</pre>
<div class="block">Given a <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream"><code>DataSpec</code></a> and a number of bytes already loaded, returns a <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream"><code>DataSpec</code></a>
that represents the remainder of the data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dataSpec</code> - The original <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream"><code>DataSpec</code></a>.</dd>
<dd><code>bytesLoaded</code> - The number of bytes already loaded.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A <a href="../../../../../com/google/android/exoplayer/upstream/DataSpec.html" title="class in com.google.android.exoplayer.upstream"><code>DataSpec</code></a> that represents the remainder of the data.</dd>
</dl>
</li>
</ul>
<a name="getIntegerCodeForString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIntegerCodeForString</h4>
<pre>public static&nbsp;int&nbsp;getIntegerCodeForString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;string)</pre>
<div class="block">Returns the integer equal to the big-endian concatenation of the characters in <code>string</code>
as bytes. <code>string</code> must contain four or fewer characters.</div>
</li>
</ul>
<a name="getTopInt-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTopInt</h4>
<pre>public static&nbsp;int&nbsp;getTopInt(long&nbsp;value)</pre>
<div class="block">Returns the top 32 bits of a long as an integer.</div>
</li>
</ul>
<a name="getBottomInt-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBottomInt</h4>
<pre>public static&nbsp;int&nbsp;getBottomInt(long&nbsp;value)</pre>
<div class="block">Returns the bottom 32 bits of a long as an integer.</div>
</li>
</ul>
<a name="getLong-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLong</h4>
<pre>public static&nbsp;long&nbsp;getLong(int&nbsp;topInteger,
int&nbsp;bottomInteger)</pre>
<div class="block">Returns a long created by concatenating the bits of two integers.</div>
</li>
</ul>
<a name="getHexStringFromBytes-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHexStringFromBytes</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getHexStringFromBytes(byte[]&nbsp;data,
int&nbsp;beginIndex,
int&nbsp;endIndex)</pre>
<div class="block">Returns a hex string representation of the data provided.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - The byte array containing the data to be turned into a hex string.</dd>
<dd><code>beginIndex</code> - The begin index, inclusive.</dd>
<dd><code>endIndex</code> - The end index, exclusive.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A string containing the hex representation of the data provided.</dd>
</dl>
</li>
</ul>
<a name="getBytesFromHexString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytesFromHexString</h4>
<pre>public static&nbsp;byte[]&nbsp;getBytesFromHexString(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hexString)</pre>
<div class="block">Returns a byte array containing values parsed from the hex string provided.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>hexString</code> - The hex string to convert to bytes.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A byte array containing values parsed from the hex string provided.</dd>
</dl>
</li>
</ul>
<a name="getCommaDelimitedSimpleClassNames-java.lang.Object:A-">
<!-- -->
</a><a name="getCommaDelimitedSimpleClassNames-T:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCommaDelimitedSimpleClassNames</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getCommaDelimitedSimpleClassNames(T[]&nbsp;objects)</pre>
<div class="block">Returns a string with comma delimited simple names of each object's class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>objects</code> - The objects whose simple class names should be comma delimited and returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A string with comma delimited simple names of each object's class.</dd>
</dl>
</li>
</ul>
<a name="getUserAgent-android.content.Context-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserAgent</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getUserAgent(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;applicationName)</pre>
<div class="block">Returns a user agent string based on the given application name and the library version.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A valid context of the calling application.</dd>
<dd><code>applicationName</code> - String that will be prefix'ed to the generated user agent.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A user agent string generated using the applicationName and the library version.</dd>
</dl>
</li>
</ul>
<a name="executePost-java.lang.String-byte:A-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executePost</h4>
<pre>public static&nbsp;byte[]&nbsp;executePost(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url,
byte[]&nbsp;data,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;requestProperties)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Executes a post request using <a href="http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html?is-external=true" title="class or interface in java.net"><code>HttpURLConnection</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - The request URL.</dd>
<dd><code>data</code> - The request body, or null.</dd>
<dd><code>requestProperties</code> - Request properties, or null.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The response body.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an error occurred making the request.</dd>
</dl>
</li>
</ul>
<a name="getPcmEncoding-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPcmEncoding</h4>
<pre>public static&nbsp;int&nbsp;getPcmEncoding(int&nbsp;bitDepth)</pre>
<div class="block">Converts a sample bit depth to a corresponding PCM encoding constant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bitDepth</code> - The bit depth. Supported values are 8, 16, 24 and 32.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The corresponding encoding. One of <a href="../../../../../com/google/android/exoplayer/C.html#ENCODING_PCM_8BIT"><code>C.ENCODING_PCM_8BIT</code></a>,
<a href="../../../../../com/google/android/exoplayer/C.html#ENCODING_PCM_16BIT"><code>C.ENCODING_PCM_16BIT</code></a>, <a href="../../../../../com/google/android/exoplayer/C.html#ENCODING_PCM_24BIT"><code>C.ENCODING_PCM_24BIT</code></a> and
<a href="../../../../../com/google/android/exoplayer/C.html#ENCODING_PCM_32BIT"><code>C.ENCODING_PCM_32BIT</code></a>. If the bit depth is unsupported then
<a href="../../../../../com/google/android/exoplayer/C.html#ENCODING_INVALID"><code>C.ENCODING_INVALID</code></a> is returned.</dd>
</dl>
</li>
</ul>
<a name="inferContentType-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inferContentType</h4>
<pre>public static&nbsp;int&nbsp;inferContentType(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fileName)</pre>
<div class="block">Makes a best guess to infer the type from a file name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - Name of the file. It can include the path of the file.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>One of <a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_DASH"><code>TYPE_DASH</code></a>, <a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_SS"><code>TYPE_SS</code></a>, <a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_HLS"><code>TYPE_HLS</code></a> or <a href="../../../../../com/google/android/exoplayer/util/Util.html#TYPE_OTHER"><code>TYPE_OTHER</code></a>.</dd>
</dl>
</li>
</ul>
<a name="escapeFileName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>escapeFileName</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;escapeFileName(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fileName)</pre>
<div class="block">Escapes a string so that it's safe for use as a file or directory name on at least FAT32
filesystems. FAT32 is the most restrictive of all filesystems still commonly used today.
<p>For simplicity, this only handles common characters known to be illegal on FAT32:
&lt;, &gt;, :, ", /, \, |, ?, and *. % is also escaped since it is used as the escape
character. Escaping is performed in a consistent way so that no collisions occur and
<a href="../../../../../com/google/android/exoplayer/util/Util.html#unescapeFileName-java.lang.String-"><code>unescapeFileName(String)</code></a> can be used to retrieve the original file name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - File name to be escaped.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An escaped file name which will be safe for use on at least FAT32 filesystems.</dd>
</dl>
</li>
</ul>
<a name="unescapeFileName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unescapeFileName</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;unescapeFileName(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fileName)</pre>
<div class="block">Unescapes an escaped file or directory name back to its original value.
<p>See <a href="../../../../../com/google/android/exoplayer/util/Util.html#escapeFileName-java.lang.String-"><code>escapeFileName(String)</code></a> for more information.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - File name to be unescaped.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The original value of the file name before it was escaped,
or null if the escaped fileName seems invalid.</dd>
</dl>
</li>
</ul>
<a name="sneakyThrow-java.lang.Throwable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sneakyThrow</h4>
<pre>public static&nbsp;void&nbsp;sneakyThrow(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;t)</pre>
<div class="block">A hacky method that always throws <code>t</code> even if <code>t</code> is a checked exception,
and is not declared to be thrown.</div>
</li>
</ul>
<a name="crc-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>crc</h4>
<pre>public static&nbsp;int&nbsp;crc(byte[]&nbsp;bytes,
int&nbsp;start,
int&nbsp;end,
int&nbsp;initialValue)</pre>
<div class="block">Returns the result of updating a CRC with the specified bytes in a "most significant bit first"
order.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - Array containing the bytes to update the crc value with.</dd>
<dd><code>start</code> - The index to the first byte in the byte range to update the crc with.</dd>
<dd><code>end</code> - The index after the last byte in the byte range to update the crc with.</dd>
<dd><code>initialValue</code> - The initial value for the crc calculation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The result of updating the initial value with the specified bytes.</dd>
</dl>
</li>
</ul>
<a name="getPhysicalDisplaySize-android.content.Context-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPhysicalDisplaySize</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/graphics/Point.html?is-external=true" title="class or interface in android.graphics">Point</a>&nbsp;getPhysicalDisplaySize(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context)</pre>
<div class="block">Gets the physical size of the default display, in pixels.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - Any context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The physical display size, in pixels.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/google/android/exoplayer/util/UriUtil.html" title="class in com.google.android.exoplayer.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/google/android/exoplayer/util/VerboseLogUtil.html" title="class in com.google.android.exoplayer.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/android/exoplayer/util/Util.html" target="_top">Frames</a></li>
<li><a href="Util.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>