<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>AndBase开发框架: com.ab.bitmap.AbFileCache类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="ic_launcher.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">AndBase开发框架
   &#160;<span id="projectnumber">1.5.8r3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>命名空间</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>页</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecom.html">com</a></li><li class="navelem"><a class="el" href="namespacecom_1_1ab.html">ab</a></li><li class="navelem"><a class="el" href="namespacecom_1_1ab_1_1bitmap.html">bitmap</a></li><li class="navelem"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html">AbFileCache</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-static-attribs">静态 Public 属性</a> &#124;
<a href="#pac-static-methods">静态包函数</a> &#124;
<a href="#pri-static-attribs">静态 Private 属性</a> &#124;
<a href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">com.ab.bitmap.AbFileCache类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a5fca6b3bb766e7d980c6ee2747c0be18"><td class="memItemLeft" align="right" valign="top">static File&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a5fca6b3bb766e7d980c6ee2747c0be18">getFileFromCache</a> (String name)</td></tr>
<tr class="separator:a5fca6b3bb766e7d980c6ee2747c0be18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25e115541da41a7dec10854293480e98"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a25e115541da41a7dec10854293480e98">addFileToCache</a> (String name, File file)</td></tr>
<tr class="separator:a25e115541da41a7dec10854293480e98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a583a3c5395dbc2987ffad23736721b11"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a583a3c5395dbc2987ffad23736721b11">removeFileFromCache</a> (String name)</td></tr>
<tr class="separator:a583a3c5395dbc2987ffad23736721b11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af873cd049d134e6cf37e29c3f370bbab"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#af873cd049d134e6cf37e29c3f370bbab">removeAllFileFromCache</a> ()</td></tr>
<tr class="separator:af873cd049d134e6cf37e29c3f370bbab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56f68c292424a15a7342eb7b7d4625c6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a56f68c292424a15a7342eb7b7d4625c6">setMaxCacheSize</a> (int <a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a2b9a7eed300dca2ed43a9a7cd18b1aa3">cacheSize</a>)</td></tr>
<tr class="separator:a56f68c292424a15a7342eb7b7d4625c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad14d578c1b1ed9b6a014e38fddae6470"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#ad14d578c1b1ed9b6a014e38fddae6470">getCacheSize</a> ()</td></tr>
<tr class="separator:ad14d578c1b1ed9b6a014e38fddae6470"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
静态 Public 属性</h2></td></tr>
<tr class="memitem:a1fab9dce4b23d4bcf474fa595a172a6b"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a1fab9dce4b23d4bcf474fa595a172a6b">maxCacheSize</a> = 10 * 1024 * 1024</td></tr>
<tr class="separator:a1fab9dce4b23d4bcf474fa595a172a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b9a7eed300dca2ed43a9a7cd18b1aa3"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a2b9a7eed300dca2ed43a9a7cd18b1aa3">cacheSize</a> = 0</td></tr>
<tr class="separator:a2b9a7eed300dca2ed43a9a7cd18b1aa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2aaa99d05a1910052e1ecd7aeeb72b6"><td class="memItemLeft" align="right" valign="top">static final ReentrantLock&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#ad2aaa99d05a1910052e1ecd7aeeb72b6">lock</a> = new ReentrantLock()</td></tr>
<tr class="separator:ad2aaa99d05a1910052e1ecd7aeeb72b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pac-static-methods"></a>
静态包函数</h2></td></tr>
<tr class="memitem:af2af5b5892acf2ac68a25737b5a2b0d0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#af2af5b5892acf2ac68a25737b5a2b0d0">[static initializer]</a></td></tr>
<tr class="separator:af2af5b5892acf2ac68a25737b5a2b0d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a>
静态 Private 属性</h2></td></tr>
<tr class="memitem:a853bd755bb72ec5060fd4bbd35f6764e"><td class="memItemLeft" align="right" valign="top">static final HashMap&lt; String, <br class="typebreak" />
File &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1bitmap_1_1_ab_file_cache.html#a853bd755bb72ec5060fd4bbd35f6764e">fileCache</a> = new HashMap&lt;String, File&gt;()</td></tr>
<tr class="separator:a853bd755bb72ec5060fd4bbd35f6764e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>© 2012 amsoft.cn 名称：AbFileCache.java 描述：文件SD卡缓存管理.</p>
<dl class="section author"><dt>作者</dt><dd>还如一梦中 </dd></dl>
<dl class="section version"><dt>版本</dt><dd>v1.0 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>：2013-5-23 上午10:10:53 </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="af2af5b5892acf2ac68a25737b5a2b0d0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">com.ab.bitmap.AbFileCache.[static initializer] </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">package</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a25e115541da41a7dec10854293480e98"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.bitmap.AbFileCache.addFileToCache </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">File&#160;</td>
          <td class="paramname"><em>file</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：增加一个File到缓存.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>文件名 </td></tr>
    <tr><td class="paramname">file</td><td>the file </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad14d578c1b1ed9b6a014e38fddae6470"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int com.ab.bitmap.AbFileCache.getCacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：缓存文件夹的大小.</p>
<dl class="section return"><dt>返回</dt><dd>the cache size </dd></dl>

</div>
</div>
<a class="anchor" id="a5fca6b3bb766e7d980c6ee2747c0be18"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static File com.ab.bitmap.AbFileCache.getFileFromCache </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：从缓存中获取这个File.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>文件名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>the file from mem cache </dd></dl>

</div>
</div>
<a class="anchor" id="af873cd049d134e6cf37e29c3f370bbab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.bitmap.AbFileCache.removeAllFileFromCache </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：清空缓存的Bitmap. </p>

</div>
</div>
<a class="anchor" id="a583a3c5395dbc2987ffad23736721b11"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.bitmap.AbFileCache.removeFileFromCache </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：从缓存删除.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>文件名 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a56f68c292424a15a7342eb7b7d4625c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.bitmap.AbFileCache.setMaxCacheSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cacheSize</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置缓存空间大小 .</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cacheSize</td><td>the new max cache size </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a class="anchor" id="a2b9a7eed300dca2ed43a9a7cd18b1aa3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int com.ab.bitmap.AbFileCache.cacheSize = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前缓存大小. </p>

</div>
</div>
<a class="anchor" id="a853bd755bb72ec5060fd4bbd35f6764e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">final HashMap&lt;String, File&gt; com.ab.bitmap.AbFileCache.fileCache = new HashMap&lt;String, File&gt;()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>文件缓存(文件名，文件). </p>

</div>
</div>
<a class="anchor" id="ad2aaa99d05a1910052e1ecd7aeeb72b6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">final ReentrantLock com.ab.bitmap.AbFileCache.lock = new ReentrantLock()</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>锁对象. </p>

</div>
</div>
<a class="anchor" id="a1fab9dce4b23d4bcf474fa595a172a6b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int com.ab.bitmap.AbFileCache.maxCacheSize = 10 * 1024 * 1024</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>10MB. </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/com/ab/bitmap/<a class="el" href="_ab_file_cache_8java.html">AbFileCache.java</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2014年 十月 28日 星期二 17:26:44 , 为 AndBase开发框架使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
