page.title=Asset
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
@jd:body
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Asset</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:asset__manager_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager_8h.html">asset_manager.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:asset__manager__jni_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager__jni_8h.html">asset_manager_jni.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga90c459935e76acf809b9ec90d1872771"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td></tr>
<tr class="separator:ga90c459935e76acf809b9ec90d1872771"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td></tr>
<tr class="separator:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td></tr>
<tr class="separator:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">AASSET_MODE_UNKNOWN</a> = 0, 
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">AASSET_MODE_RANDOM</a> = 1, 
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">AASSET_MODE_STREAMING</a> = 2, 
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">AASSET_MODE_BUFFER</a> = 3
 }</td></tr>
<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">AAssetManager_openDir</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *dirName)</td></tr>
<tr class="separator:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *filename, int mode)</td></tr>
<tr class="separator:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
<tr class="separator:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">AAssetDir_rewind</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
<tr class="separator:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace1c4d0da274d643c5b10ca218cc6088"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
<tr class="separator:gace1c4d0da274d643c5b10ca218cc6088"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaadd86322c1fda5121b6d33745c317fb9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">AAsset_read</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, void *buf, size_t count)</td></tr>
<tr class="separator:gaadd86322c1fda5121b6d33745c317fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">AAsset_seek</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t offset, int whence)</td></tr>
<tr class="separator:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">AAsset_seek64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t offset, int whence)</td></tr>
<tr class="separator:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f241e49f691dafcada23bcb76155122"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga1f241e49f691dafcada23bcb76155122"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga553a14512a98542306238c3ce70d344f"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">AAsset_getBuffer</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga553a14512a98542306238c3ce70d344f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">AAsset_getLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">AAsset_getLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memItemLeft" align="right" valign="top">off_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">AAsset_getRemainingLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21e7221d88dcc44106843192b66755b5"><td class="memItemLeft" align="right" valign="top">off64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">AAsset_getRemainingLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga21e7221d88dcc44106843192b66755b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1af4ffd050016e99961e24f550981677"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">AAsset_openFileDescriptor</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t *outStart, off_t *outLength)</td></tr>
<tr class="separator:ga1af4ffd050016e99961e24f550981677"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">AAsset_openFileDescriptor64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t *outStart, off64_t *outLength)</td></tr>
<tr class="separator:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20344cb952a77fa1004f592fb1b55124"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">AAsset_isAllocated</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga20344cb952a77fa1004f592fb1b55124"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadfd6537af41577735bcaee52120127f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava</a> (JNIEnv *env, jobject assetManager)</td></tr>
<tr class="separator:gadfd6537af41577735bcaee52120127f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga5630b1f1aa5cd363303018cb2f12f95c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> provides access to a read-only asset.</p>
<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects are NOT thread-safe, and should not be shared across threads. </p>

</div>
</div>
<a class="anchor" id="ga001a6b9c36a06ee977b9f51ed7103cdb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> provides access to a chunk of the asset hierarchy as if it were a single directory. The contents are populated by the <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>.</p>
<p>The list of files will be sorted in ascending order by ASCII value. </p>

</div>
</div>
<a class="anchor" id="ga90c459935e76acf809b9ec90d1872771"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> provides access to an application's raw assets by creating <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects.</p>
<p>AAssetManager is a wrapper to the low-level native implementation of the java <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>, a pointer can be obtained using <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava()</a>.</p>
<p>The asset hierarchy may be examined like a filesystem, using <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> objects to peruse a single directory.</p>
<p>A native <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> pointer may be shared across multiple threads. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga06fc87d81c62e9abb8790b6e5713c55b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Available access modes for opening assets with <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4"></a>AASSET_MODE_UNKNOWN</em>&#160;</td><td class="fielddoc">
<p>No specific information about how data will be accessed. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f"></a>AASSET_MODE_RANDOM</em>&#160;</td><td class="fielddoc">
<p>Read chunks, and seek forward and backward. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74"></a>AASSET_MODE_STREAMING</em>&#160;</td><td class="fielddoc">
<p>Read sequentially, with an occasional forward seek. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb"></a>AASSET_MODE_BUFFER</em>&#160;</td><td class="fielddoc">
<p>Caller plans to ask for a read-only buffer with all data. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga1f241e49f691dafcada23bcb76155122"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AAsset_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Close the asset, freeing all associated resources. </p>

</div>
</div>
<a class="anchor" id="ga553a14512a98542306238c3ce70d344f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const void* AAsset_getBuffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get a pointer to a buffer holding the entire contents of the assset.</p>
<p>Returns NULL on failure. </p>

</div>
</div>
<a class="anchor" id="gaad8ec42e28522ebc72d3a5c357f9a600"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off_t AAsset_getLength </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Report the total size of the asset data. </p>

</div>
</div>
<a class="anchor" id="ga55c8bc459327d5d23089e6a4b453f3f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off64_t AAsset_getLength64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Report the total size of the asset data. Reports the size using a 64-bit number insted of 32-bit as AAsset_getLength. </p>

</div>
</div>
<a class="anchor" id="gae806f55cbc4a93ca245f2adfd63d3eee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off_t AAsset_getRemainingLength </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Report the total amount of asset data that can be read from the current position. </p>

</div>
</div>
<a class="anchor" id="ga21e7221d88dcc44106843192b66755b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off64_t AAsset_getRemainingLength64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Report the total amount of asset data that can be read from the current position.</p>
<p>Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does. </p>

</div>
</div>
<a class="anchor" id="ga20344cb952a77fa1004f592fb1b55124"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AAsset_isAllocated </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not mmapped). </p>

</div>
</div>
<a class="anchor" id="ga1af4ffd050016e99961e24f550981677"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AAsset_openFileDescriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off_t *&#160;</td>
          <td class="paramname"><em>outStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off_t *&#160;</td>
          <td class="paramname"><em>outLength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Open a new file descriptor that can be used to read the asset data. If the start or length cannot be represented by a 32-bit number, it will be truncated. If the file is large, use AAsset_openFileDescriptor64 instead.</p>
<p>Returns &lt; 0 if direct fd access is not possible (for example, if the asset is compressed). </p>

</div>
</div>
<a class="anchor" id="ga123a44a575f85d91a00a8456dab7bd0a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AAsset_openFileDescriptor64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off64_t *&#160;</td>
          <td class="paramname"><em>outStart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off64_t *&#160;</td>
          <td class="paramname"><em>outLength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Open a new file descriptor that can be used to read the asset data.</p>
<p>Uses a 64-bit number for the offset and length instead of 32-bit instead of as AAsset_openFileDescriptor does.</p>
<p>Returns &lt; 0 if direct fd access is not possible (for example, if the asset is compressed). </p>

</div>
</div>
<a class="anchor" id="gaadd86322c1fda5121b6d33745c317fb9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AAsset_read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attempt to read 'count' bytes of data from the current offset.</p>
<p>Returns the number of bytes read, zero on EOF, or &lt; 0 on error. </p>

</div>
</div>
<a class="anchor" id="gacc026a8bedeb1ef80bf12df3b72611a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off_t AAsset_seek </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>whence</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
<p>Returns the new position on success, or (off_t) -1 on error. </p>

</div>
</div>
<a class="anchor" id="ga81fbe4368de24a3296ef7a6eba0053c7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">off64_t AAsset_seek64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *&#160;</td>
          <td class="paramname"><em>asset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">off64_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>whence</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
<p>Uses 64-bit data type for large files as opposed to the 32-bit type used by AAsset_seek.</p>
<p>Returns the new position on success, or (off64_t) -1 on error. </p>

</div>
</div>
<a class="anchor" id="gace1c4d0da274d643c5b10ca218cc6088"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AAssetDir_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td>
          <td class="paramname"><em>assetDir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Close an opened AAssetDir, freeing any related resources. </p>

</div>
</div>
<a class="anchor" id="ga4703b9f7baa3daeba248b6547de6b9b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* AAssetDir_getNextFileName </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td>
          <td class="paramname"><em>assetDir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Iterate over the files in an asset directory. A NULL string is returned when all the file names have been returned.</p>
<p>The returned file name is suitable for passing to <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open()</a>.</p>
<p>The string returned here is owned by the AssetDir implementation and is not guaranteed to remain valid if any other calls are made on this AAssetDir instance. </p>

</div>
</div>
<a class="anchor" id="ga45db6d19ad5e1c0f9b2e6b4059da14b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AAssetDir_rewind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *&#160;</td>
          <td class="paramname"><em>assetDir</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reset the iteration state of <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName()</a> to the beginning. </p>

</div>
</div>
<a class="anchor" id="gadfd6537af41577735bcaee52120127f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>* AAssetManager_fromJava </td>
          <td>(</td>
          <td class="paramtype">JNIEnv *&#160;</td>
          <td class="paramname"><em>env</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">jobject&#160;</td>
          <td class="paramname"><em>assetManager</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager object. Note that the caller is responsible for obtaining and holding a VM reference to the jobject to prevent its being garbage collected while the native object is in use. </p>

</div>
</div>
<a class="anchor" id="ga0037ce3c10a591fe632f34c1aa62955c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>* AAssetManager_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td>
          <td class="paramname"><em>mgr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Open an asset.</p>
<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close()</a>. </p>

</div>
</div>
<a class="anchor" id="gab5b57ff012d6d1024d8bf5d30aedced4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>* AAssetManager_openDir </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td>
          <td class="paramname"><em>mgr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>dirName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Open the named directory within the asset hierarchy. The directory can then be inspected with the AAssetDir functions. To open the top-level directory, pass in "" as the dirName.</p>
<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close()</a>. </p>

</div>
</div>
</div><!-- contents -->