Skip to content

Commit d757a4b

Browse files
committed
Update
1 parent e978659 commit d757a4b

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

‎SourceAnalysis/AtomicFile源码解析.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ AtomicFile 在 `android.support.v4.util` 包下,**是一个与文件相关的
2222
2323
## 主要方法
2424

25-
| ~ | AtomicFile(File baseName) <br/> 构造方法,通过File创建AtomicFile |
26-
| :--------------: | ---------------------------------------- |
27-
| FileOutputStream | startWrite() <br/> 准备写文件,获得一个向文件写入的字节流(FileOutputStream)。 |
28-
| void | finishWrite(FileOutputStream str) <br/> 写入完毕时调用。 |
29-
| void | failWrite(FileOutputStream str) <br/> 写入失败时调用。 |
30-
| FileInputStream | openRead() <br/> 准备读取文件,获得一个从文件读取的字节流(FileInputStream)。 |
31-
| byte[] | readFully() <br/> 将文件中所有内容读取出来用 byte 数组返回,相当于更方便的 openRead 方法。 |
32-
| File | getBaseFile() <br/> 获得原文件地址。 |
33-
| void | delete() <br/> 删除 AtomicFile,包括原文件和备份文件。 |
25+
| 返回值 | 方法名称和简介 |
26+
| :------------------: | ---------------------------------------- |
27+
| | **AtomicFile(File baseName)** <br/> 构造方法,通过File创建AtomicFile |
28+
| **FileOutputStream** | **startWrite()** <br/> 准备写文件,获得一个向文件写入的字节流(FileOutputStream)。 |
29+
| **void** | **finishWrite(FileOutputStream str)** <br/> 写入完毕时调用。 |
30+
| **void** | **failWrite(FileOutputStream str)** <br/> 写入失败时调用。 |
31+
| **FileInputStream** | **openRead()** <br/> 准备读取文件,获得一个从文件读取的字节流(FileInputStream)。 |
32+
| **byte[]** | **readFully()** <br/> 将文件中所有内容读取出来用 byte 数组返回,相当于更方便的 openRead 方法。 |
33+
| **File** | **getBaseFile()** <br/> 获得原文件地址。 |
34+
| **void** | **delete()** <br/> 删除 AtomicFile,包括原文件和备份文件。 |
3435

3536
## AtomicFile 原理
3637

0 commit comments

Comments
 (0)