mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
1332 lines
57 KiB
HTML
1332 lines
57 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
|
|
<title>ParsableByteArray (ExoPlayer library)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
|
|
<script type="text/javascript" src="../../../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
|
|
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="ParsableByteArray (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../../../";
|
|
var useModuleDirectories = false;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.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" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</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>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.util</a></div>
|
|
<h2 title="Class ParsableByteArray" class="title">Class ParsableByteArray</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.google.android.exoplayer2.util.ParsableByteArray</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public final class <span class="typeNameLabel">ParsableByteArray</span>
|
|
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
|
|
<div class="block">Wraps a byte array, providing a set of methods for parsing data from it. Numerical values are
|
|
parsed with the assumption that their constituent bytes are in big endian order.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Constructor</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">ParsableByteArray</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new instance that initially has no backing data.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(byte%5B%5D)">ParsableByteArray</a></span>​(byte[] data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new instance wrapping <code>data</code>, and sets the limit to <code>data.length</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(byte%5B%5D,int)">ParsableByteArray</a></span>​(byte[] data,
|
|
int limit)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new instance that wraps an existing array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(int)">ParsableByteArray</a></span>​(int limit)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new instance with <code>limit</code> bytes and sets the limit.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bytesLeft()">bytesLeft</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the number of bytes yet to be read.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#capacity()">capacity</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the capacity of the array, which may be larger than the limit.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureCapacity(int)">ensureCapacity</a></span>​(int requiredCapacity)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Ensures the backing array is at least <code>requiredCapacity</code> long.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getData()">getData</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the underlying array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPosition()">getPosition</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the current offset in the array, in bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#limit()">limit</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the limit.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>char</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#peekChar()">peekChar</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Peeks at the next char.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#peekUnsignedByte()">peekUnsignedByte</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Peeks at the next byte as an unsigned value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(byte%5B%5D,int,int)">readBytes</a></span>​(byte[] buffer,
|
|
int offset,
|
|
int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next <code>length</code> bytes into <code>buffer</code> at <code>offset</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(com.google.android.exoplayer2.util.ParsableBitArray,int)">readBytes</a></span>​(<a href="ParsableBitArray.html" title="class in com.google.android.exoplayer2.util">ParsableBitArray</a> bitArray,
|
|
int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next <code>length</code> bytes into <code>bitArray</code>, and resets the position of <code>
|
|
bitArray</code> to zero.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(java.nio.ByteBuffer,int)">readBytes</a></span>​(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a> buffer,
|
|
int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next <code>length</code> bytes into <code>buffer</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readDelimiterTerminatedString(char)">readDelimiterTerminatedString</a></span>​(char delimiter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads up to the next delimiter byte (or the limit) as UTF-8 characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readDouble()">readDouble</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next eight bytes as a 64-bit floating point value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readFloat()">readFloat</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as a 32-bit floating point value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readInt()">readInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as a signed value</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readInt24()">readInt24</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next three bytes as a signed value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLine()">readLine</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads a line of text in UTF-8.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLine(java.nio.charset.Charset)">readLine</a></span>​(<a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top">Charset</a> charset)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads a line of text in <code>charset</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianInt()">readLittleEndianInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as a signed value in little endian order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianInt24()">readLittleEndianInt24</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next three bytes as a signed value in little endian order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianLong()">readLittleEndianLong</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next eight bytes as a signed value in little endian order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>short</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianShort()">readLittleEndianShort</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next two bytes as a signed value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianUnsignedInt()">readLittleEndianUnsignedInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as an unsigned value in little endian order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianUnsignedInt24()">readLittleEndianUnsignedInt24</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next three bytes as an unsigned value in little endian order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianUnsignedIntToInt()">readLittleEndianUnsignedIntToInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as a little endian unsigned integer into an integer, if the top bit
|
|
is a zero.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLittleEndianUnsignedShort()">readLittleEndianUnsignedShort</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next two bytes as an unsigned value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLong()">readLong</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next eight bytes as a signed value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readNullTerminatedString()">readNullTerminatedString</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads up to the next NUL byte (or the limit) as UTF-8 characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readNullTerminatedString(int)">readNullTerminatedString</a></span>​(int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next <code>length</code> bytes as UTF-8 characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>short</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readShort()">readShort</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next two bytes as a signed value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readString(int)">readString</a></span>​(int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next <code>length</code> bytes as UTF-8 characters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readString(int,java.nio.charset.Charset)">readString</a></span>​(int length,
|
|
<a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top">Charset</a> charset)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next <code>length</code> bytes as characters in the specified <a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top"><code>Charset</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readSynchSafeInt()">readSynchSafeInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads a Synchsafe integer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedByte()">readUnsignedByte</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next byte as an unsigned value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedFixedPoint1616()">readUnsignedFixedPoint1616</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes, returning the integer portion of the fixed point 16.16 integer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedInt()">readUnsignedInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as an unsigned value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedInt24()">readUnsignedInt24</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next three bytes as an unsigned value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedIntToInt()">readUnsignedIntToInt</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next four bytes as an unsigned integer into an integer, if the top bit is a zero.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedLongToLong()">readUnsignedLongToLong</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next eight bytes as an unsigned long into a long, if the top bit is a zero.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUnsignedShort()">readUnsignedShort</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads the next two bytes as an unsigned value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUtf8EncodedLong()">readUtf8EncodedLong</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads a long value encoded by UTF-8 encoding</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top">Charset</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readUtfCharsetFromBom()">readUtfCharsetFromBom</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads a UTF byte order mark (BOM) and returns the UTF <a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top"><code>Charset</code></a> it represents.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i42" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset(byte%5B%5D)">reset</a></span>​(byte[] data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Updates the instance to wrap <code>data</code>, and resets the position to zero and the limit to
|
|
<code>data.length</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i43" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset(byte%5B%5D,int)">reset</a></span>​(byte[] data,
|
|
int limit)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Updates the instance to wrap <code>data</code>, and resets the position to zero.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i44" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset(int)">reset</a></span>​(int limit)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Resets the position to zero and the limit to the specified value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i45" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLimit(int)">setLimit</a></span>​(int limit)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the limit.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i46" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPosition(int)">setPosition</a></span>​(int position)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the reading offset in the array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i47" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skipBytes(int)">skipBytes</a></span>​(int bytes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Moves the reading offset by <code>bytes</code>.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
|
|
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a id="<init>()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ParsableByteArray</h4>
|
|
<pre>public ParsableByteArray()</pre>
|
|
<div class="block">Creates a new instance that initially has no backing data.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="<init>(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ParsableByteArray</h4>
|
|
<pre>public ParsableByteArray​(int limit)</pre>
|
|
<div class="block">Creates a new instance with <code>limit</code> bytes and sets the limit.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>limit</code> - The limit to set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="<init>(byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ParsableByteArray</h4>
|
|
<pre>public ParsableByteArray​(byte[] data)</pre>
|
|
<div class="block">Creates a new instance wrapping <code>data</code>, and sets the limit to <code>data.length</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>data</code> - The array to wrap.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="<init>(byte[],int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>ParsableByteArray</h4>
|
|
<pre>public ParsableByteArray​(byte[] data,
|
|
int limit)</pre>
|
|
<div class="block">Creates a new instance that wraps an existing array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>data</code> - The data to wrap.</dd>
|
|
<dd><code>limit</code> - The limit to set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="reset(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reset</h4>
|
|
<pre class="methodSignature">public void reset​(int limit)</pre>
|
|
<div class="block">Resets the position to zero and the limit to the specified value. This might replace or wipe
|
|
the <a href="#getData()"><code>underlying array</code></a>, potentially invalidating any local references.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>limit</code> - The limit to set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="reset(byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reset</h4>
|
|
<pre class="methodSignature">public void reset​(byte[] data)</pre>
|
|
<div class="block">Updates the instance to wrap <code>data</code>, and resets the position to zero and the limit to
|
|
<code>data.length</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>data</code> - The array to wrap.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="reset(byte[],int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>reset</h4>
|
|
<pre class="methodSignature">public void reset​(byte[] data,
|
|
int limit)</pre>
|
|
<div class="block">Updates the instance to wrap <code>data</code>, and resets the position to zero.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>data</code> - The array to wrap.</dd>
|
|
<dd><code>limit</code> - The limit to set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ensureCapacity(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ensureCapacity</h4>
|
|
<pre class="methodSignature">public void ensureCapacity​(int requiredCapacity)</pre>
|
|
<div class="block">Ensures the backing array is at least <code>requiredCapacity</code> long.
|
|
|
|
<p><a href="#getPosition()"><code>position</code></a>, <a href="#limit()"><code>limit</code></a>, and all data in the underlying
|
|
array (including that beyond <a href="#limit()"><code>limit()</code></a>) are preserved.
|
|
|
|
<p>This might replace or wipe the <a href="#getData()"><code>underlying array</code></a>, potentially invalidating
|
|
any local references.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="bytesLeft()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>bytesLeft</h4>
|
|
<pre class="methodSignature">public int bytesLeft()</pre>
|
|
<div class="block">Returns the number of bytes yet to be read.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="limit()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>limit</h4>
|
|
<pre class="methodSignature">public int limit()</pre>
|
|
<div class="block">Returns the limit.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="setLimit(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setLimit</h4>
|
|
<pre class="methodSignature">public void setLimit​(int limit)</pre>
|
|
<div class="block">Sets the limit.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>limit</code> - The limit to set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPosition()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPosition</h4>
|
|
<pre class="methodSignature">public int getPosition()</pre>
|
|
<div class="block">Returns the current offset in the array, in bytes.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="setPosition(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setPosition</h4>
|
|
<pre class="methodSignature">public void setPosition​(int position)</pre>
|
|
<div class="block">Sets the reading offset in the array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>position</code> - Byte offset in the array from which to read.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - Thrown if the new position is neither in nor at the end of the
|
|
array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getData()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getData</h4>
|
|
<pre class="methodSignature">public byte[] getData()</pre>
|
|
<div class="block">Returns the underlying array.
|
|
|
|
<p>Changes to this array are reflected in the results of the <code>read...()</code> methods.
|
|
|
|
<p>This reference must be assumed to become invalid when <a href="#reset(int)"><code>reset(int)</code></a> or <a href="#ensureCapacity(int)"><code>ensureCapacity(int)</code></a> are called (because the array might get reallocated).</div>
|
|
</li>
|
|
</ul>
|
|
<a id="capacity()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>capacity</h4>
|
|
<pre class="methodSignature">public int capacity()</pre>
|
|
<div class="block">Returns the capacity of the array, which may be larger than the limit.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="skipBytes(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>skipBytes</h4>
|
|
<pre class="methodSignature">public void skipBytes​(int bytes)</pre>
|
|
<div class="block">Moves the reading offset by <code>bytes</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - The number of bytes to skip.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - Thrown if the new position is neither in nor at the end of the
|
|
array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readBytes(com.google.android.exoplayer2.util.ParsableBitArray,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readBytes</h4>
|
|
<pre class="methodSignature">public void readBytes​(<a href="ParsableBitArray.html" title="class in com.google.android.exoplayer2.util">ParsableBitArray</a> bitArray,
|
|
int length)</pre>
|
|
<div class="block">Reads the next <code>length</code> bytes into <code>bitArray</code>, and resets the position of <code>
|
|
bitArray</code> to zero.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bitArray</code> - The <a href="ParsableBitArray.html" title="class in com.google.android.exoplayer2.util"><code>ParsableBitArray</code></a> into which the bytes should be read.</dd>
|
|
<dd><code>length</code> - The number of bytes to write.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readBytes(byte[],int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readBytes</h4>
|
|
<pre class="methodSignature">public void readBytes​(byte[] buffer,
|
|
int offset,
|
|
int length)</pre>
|
|
<div class="block">Reads the next <code>length</code> bytes into <code>buffer</code> at <code>offset</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>buffer</code> - The array into which the read data should be written.</dd>
|
|
<dd><code>offset</code> - The offset in <code>buffer</code> at which the read data should be written.</dd>
|
|
<dd><code>length</code> - The number of bytes to read.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="https://developer.android.com/reference/java/lang/System.html#arraycopy(java.lang.Object,int,java.lang.Object,int,int)" title="class or interface in java.lang" class="externalLink" target="_top"><code>System.arraycopy(Object, int, Object, int, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readBytes(java.nio.ByteBuffer,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readBytes</h4>
|
|
<pre class="methodSignature">public void readBytes​(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a> buffer,
|
|
int length)</pre>
|
|
<div class="block">Reads the next <code>length</code> bytes into <code>buffer</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>buffer</code> - The <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a> into which the read data should be written.</dd>
|
|
<dd><code>length</code> - The number of bytes to read.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="https://developer.android.com/reference/java/nio/ByteBuffer.html#put(byte%5B%5D,int,int)" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer.put(byte[], int, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="peekUnsignedByte()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>peekUnsignedByte</h4>
|
|
<pre class="methodSignature">public int peekUnsignedByte()</pre>
|
|
<div class="block">Peeks at the next byte as an unsigned value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="peekChar()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>peekChar</h4>
|
|
<pre class="methodSignature">public char peekChar()</pre>
|
|
<div class="block">Peeks at the next char.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedByte()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedByte</h4>
|
|
<pre class="methodSignature">public int readUnsignedByte()</pre>
|
|
<div class="block">Reads the next byte as an unsigned value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedShort()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedShort</h4>
|
|
<pre class="methodSignature">public int readUnsignedShort()</pre>
|
|
<div class="block">Reads the next two bytes as an unsigned value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianUnsignedShort()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianUnsignedShort</h4>
|
|
<pre class="methodSignature">public int readLittleEndianUnsignedShort()</pre>
|
|
<div class="block">Reads the next two bytes as an unsigned value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readShort()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readShort</h4>
|
|
<pre class="methodSignature">public short readShort()</pre>
|
|
<div class="block">Reads the next two bytes as a signed value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianShort()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianShort</h4>
|
|
<pre class="methodSignature">public short readLittleEndianShort()</pre>
|
|
<div class="block">Reads the next two bytes as a signed value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedInt24()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedInt24</h4>
|
|
<pre class="methodSignature">public int readUnsignedInt24()</pre>
|
|
<div class="block">Reads the next three bytes as an unsigned value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readInt24()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readInt24</h4>
|
|
<pre class="methodSignature">public int readInt24()</pre>
|
|
<div class="block">Reads the next three bytes as a signed value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianInt24()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianInt24</h4>
|
|
<pre class="methodSignature">public int readLittleEndianInt24()</pre>
|
|
<div class="block">Reads the next three bytes as a signed value in little endian order.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianUnsignedInt24()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianUnsignedInt24</h4>
|
|
<pre class="methodSignature">public int readLittleEndianUnsignedInt24()</pre>
|
|
<div class="block">Reads the next three bytes as an unsigned value in little endian order.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedInt</h4>
|
|
<pre class="methodSignature">public long readUnsignedInt()</pre>
|
|
<div class="block">Reads the next four bytes as an unsigned value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianUnsignedInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianUnsignedInt</h4>
|
|
<pre class="methodSignature">public long readLittleEndianUnsignedInt()</pre>
|
|
<div class="block">Reads the next four bytes as an unsigned value in little endian order.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readInt</h4>
|
|
<pre class="methodSignature">public int readInt()</pre>
|
|
<div class="block">Reads the next four bytes as a signed value</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianInt</h4>
|
|
<pre class="methodSignature">public int readLittleEndianInt()</pre>
|
|
<div class="block">Reads the next four bytes as a signed value in little endian order.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLong()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLong</h4>
|
|
<pre class="methodSignature">public long readLong()</pre>
|
|
<div class="block">Reads the next eight bytes as a signed value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianLong()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianLong</h4>
|
|
<pre class="methodSignature">public long readLittleEndianLong()</pre>
|
|
<div class="block">Reads the next eight bytes as a signed value in little endian order.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedFixedPoint1616()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedFixedPoint1616</h4>
|
|
<pre class="methodSignature">public int readUnsignedFixedPoint1616()</pre>
|
|
<div class="block">Reads the next four bytes, returning the integer portion of the fixed point 16.16 integer.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readSynchSafeInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readSynchSafeInt</h4>
|
|
<pre class="methodSignature">public int readSynchSafeInt()</pre>
|
|
<div class="block">Reads a Synchsafe integer.
|
|
|
|
<p>Synchsafe integers keep the highest bit of every byte zeroed. A 32 bit synchsafe integer can
|
|
store 28 bits of information.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The parsed value.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedIntToInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedIntToInt</h4>
|
|
<pre class="methodSignature">public int readUnsignedIntToInt()</pre>
|
|
<div class="block">Reads the next four bytes as an unsigned integer into an integer, if the top bit is a zero.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - Thrown if the top bit of the input data is set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readLittleEndianUnsignedIntToInt()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLittleEndianUnsignedIntToInt</h4>
|
|
<pre class="methodSignature">public int readLittleEndianUnsignedIntToInt()</pre>
|
|
<div class="block">Reads the next four bytes as a little endian unsigned integer into an integer, if the top bit
|
|
is a zero.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - Thrown if the top bit of the input data is set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readUnsignedLongToLong()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUnsignedLongToLong</h4>
|
|
<pre class="methodSignature">public long readUnsignedLongToLong()</pre>
|
|
<div class="block">Reads the next eight bytes as an unsigned long into a long, if the top bit is a zero.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - Thrown if the top bit of the input data is set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readFloat()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readFloat</h4>
|
|
<pre class="methodSignature">public float readFloat()</pre>
|
|
<div class="block">Reads the next four bytes as a 32-bit floating point value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readDouble()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readDouble</h4>
|
|
<pre class="methodSignature">public double readDouble()</pre>
|
|
<div class="block">Reads the next eight bytes as a 64-bit floating point value.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readString(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readString</h4>
|
|
<pre class="methodSignature">public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> readString​(int length)</pre>
|
|
<div class="block">Reads the next <code>length</code> bytes as UTF-8 characters.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The number of bytes to read.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string encoded by the bytes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readString(int,java.nio.charset.Charset)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readString</h4>
|
|
<pre class="methodSignature">public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> readString​(int length,
|
|
<a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top">Charset</a> charset)</pre>
|
|
<div class="block">Reads the next <code>length</code> bytes as characters in the specified <a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top"><code>Charset</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The number of bytes to read.</dd>
|
|
<dd><code>charset</code> - The character set of the encoded characters.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string encoded by the bytes in the specified character set.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readNullTerminatedString(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readNullTerminatedString</h4>
|
|
<pre class="methodSignature">public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> readNullTerminatedString​(int length)</pre>
|
|
<div class="block">Reads the next <code>length</code> bytes as UTF-8 characters. A terminating NUL byte is discarded,
|
|
if present.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>length</code> - The number of bytes to read.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string, not including any terminating NUL byte.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readNullTerminatedString()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readNullTerminatedString</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> readNullTerminatedString()</pre>
|
|
<div class="block">Reads up to the next NUL byte (or the limit) as UTF-8 characters.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string not including any terminating NUL byte, or null if the end of the data has
|
|
already been reached.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readDelimiterTerminatedString(char)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readDelimiterTerminatedString</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> readDelimiterTerminatedString​(char delimiter)</pre>
|
|
<div class="block">Reads up to the next delimiter byte (or the limit) as UTF-8 characters.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string not including any terminating delimiter byte, or null if the end of the data
|
|
has already been reached.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readLine()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLine</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> readLine()</pre>
|
|
<div class="block">Reads a line of text in UTF-8.
|
|
|
|
<p>Equivalent to passing <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/base/Charsets.html?is-external=true#UTF_8" title="class or interface in com.google.common.base" class="externalLink"><code>Charsets.UTF_8</code></a> to <a href="#readLine(java.nio.charset.Charset)"><code>readLine(Charset)</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="readLine(java.nio.charset.Charset)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readLine</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> readLine​(<a href="https://developer.android.com/reference/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink" target="_top">Charset</a> charset)</pre>
|
|
<div class="block">Reads a line of text in <code>charset</code>.
|
|
|
|
<p>A line is considered to be terminated by any one of a carriage return ('\r'), a line feed
|
|
('\n'), or a carriage return followed immediately by a line feed ('\r\n'). This method discards
|
|
leading UTF byte order marks (BOM), if present.
|
|
|
|
<p>The <a href="#getPosition()">position</a> is advanced to start of the next line (i.e. any
|
|
line terminators are skipped).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>charset</code> - The charset used to interpret the bytes as a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The line not including any line-termination characters, or null if the end of the data
|
|
has already been reached.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - if charset is not supported. Only US_ASCII, UTF-8, UTF-16,
|
|
UTF-16BE, and UTF-16LE are supported.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readUtf8EncodedLong()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readUtf8EncodedLong</h4>
|
|
<pre class="methodSignature">public long readUtf8EncodedLong()</pre>
|
|
<div class="block">Reads a long value encoded by UTF-8 encoding</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Decoded long value</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/NumberFormatException.html" title="class or interface in java.lang" class="externalLink" target="_top">NumberFormatException</a></code> - if there is a problem with decoding</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readUtfCharsetFromBom()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>readUtfCharsetFromBom</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public <a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top">Charset</a> readUtfCharsetFromBom()</pre>
|
|
<div class="block">Reads a UTF byte order mark (BOM) and returns the UTF <a href="https://developer.android.com/reference/java/nio/charset/Charset.html" title="class or interface in java.nio.charset" class="externalLink" target="_top"><code>Charset</code></a> it represents. Returns
|
|
<code>null</code> without advancing <a href="#getPosition()"><code>position</code></a> if no BOM is found.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.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" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses.html">All 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>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|