|
2 | 2 |
|
3 | 3 | Gradle: |
4 | 4 | ```groovy |
5 | | -implementation 'com.blankj:utilcode:1.16.4' |
| 5 | +implementation 'com.blankj:utilcode:1.17.0' |
6 | 6 | ``` |
7 | 7 |
|
8 | 8 |
|
@@ -90,7 +90,54 @@ getNavBarColor : 获取导航栏颜色 |
90 | 90 | isNavBarVisible : 判断导航栏是否可见 |
91 | 91 | ``` |
92 | 92 |
|
93 | | -* ### 缓存相关 -> [CacheUtils.java][cache.java] -> [Test][cache.test] |
| 93 | +* ### 磁盘缓存相关 -> [CacheDiskUtils.java][cache_disk.java] -> [Test][cache_disk.test] |
| 94 | +``` |
| 95 | +getInstance : 获取缓存实例 |
| 96 | +Instance.put : 缓存中写入数据 |
| 97 | +Instance.getBytes : 缓存中读取字节数组 |
| 98 | +Instance.getString : 缓存中读取 String |
| 99 | +Instance.getJSONObject : 缓存中读取 JSONObject |
| 100 | +Instance.getJSONArray : 缓存中读取 JSONArray |
| 101 | +Instance.getBitmap : 缓存中读取 Bitmap |
| 102 | +Instance.getDrawable : 缓存中读取 Drawable |
| 103 | +Instance.getParcelable : 缓存中读取 Parcelable |
| 104 | +Instance.getSerializable: 缓存中读取 Serializable |
| 105 | +Instance.getCacheSize : 获取缓存大小 |
| 106 | +Instance.getCacheCount : 获取缓存个数 |
| 107 | +Instance.remove : 根据键值移除缓存 |
| 108 | +Instance.clear : 清除所有缓存 |
| 109 | +``` |
| 110 | + |
| 111 | +* ### 二级缓存相关 -> [CacheDoubleUtils.java][cache_double.java] -> [Test][cache_double.test] |
| 112 | +``` |
| 113 | +getInstance : 获取缓存实例 |
| 114 | +Instance.put : 缓存中写入数据 |
| 115 | +Instance.getBytes : 缓存中读取字节数组 |
| 116 | +Instance.getString : 缓存中读取 String |
| 117 | +Instance.getJSONObject : 缓存中读取 JSONObject |
| 118 | +Instance.getJSONArray : 缓存中读取 JSONArray |
| 119 | +Instance.getBitmap : 缓存中读取 Bitmap |
| 120 | +Instance.getDrawable : 缓存中读取 Drawable |
| 121 | +Instance.getParcelable : 缓存中读取 Parcelable |
| 122 | +Instance.getSerializable : 缓存中读取 Serializable |
| 123 | +Instance.getCacheDiskSize : 获取磁盘缓存大小 |
| 124 | +Instance.getCacheDiskCount : 获取磁盘缓存个数 |
| 125 | +Instance.getCacheMemoryCount: 获取内存缓存个数 |
| 126 | +Instance.remove : 根据键值移除缓存 |
| 127 | +Instance.clear : 清除所有缓存 |
| 128 | +``` |
| 129 | + |
| 130 | +* ### 内存缓存相关 -> [CacheMemoryUtils.java][cache_memory.java] -> [Test][cache_memory.test] |
| 131 | +``` |
| 132 | +getInstance : 获取缓存实例 |
| 133 | +Instance.put : 缓存中写入数据 |
| 134 | +Instance.get : 缓存中读取字节数组 |
| 135 | +Instance.getCacheCount: 获取缓存个数 |
| 136 | +Instance.remove : 根据键值移除缓存 |
| 137 | +Instance.clear : 清除所有缓存 |
| 138 | +``` |
| 139 | + |
| 140 | +* ### ~~缓存相关 -> [CacheUtils.java][cache.java]~~ |
94 | 141 | ``` |
95 | 142 | getInstance : 获取缓存实例 |
96 | 143 | Instance.put : 缓存中写入数据 |
@@ -721,8 +768,16 @@ getComments : 获取压缩文件中的注释链表 |
721 | 768 | [bar.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/BarUtils.java |
722 | 769 | [bar.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/feature/core/bar/BarActivity.java |
723 | 770 |
|
| 771 | +[cache_disk.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CacheDiskUtils.java |
| 772 | +[cache_disk.test]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/CacheDiskUtilsTest.java |
| 773 | + |
| 774 | +[cache_double.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CacheDoubleUtils.java |
| 775 | +[cache_double.test]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/CacheDoubleUtilsTest.java |
| 776 | + |
| 777 | +[cache_memory.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CacheMemoryUtils.java |
| 778 | +[cache_memory.test]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/CacheMemoryUtilsTest.java |
| 779 | + |
724 | 780 | [cache.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CacheUtils.java |
725 | | -[cache.test]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/CacheUtilsTest.java |
726 | 781 |
|
727 | 782 | [clean.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CleanUtils.java |
728 | 783 | [clean.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/feature/core/clean/CleanActivity.java |
|
0 commit comments