diff options
author | YuutaW <17158086+trumeet@users.noreply.github.com> | 2019-04-19 10:47:50 -0700 |
---|---|---|
committer | YuutaW <17158086+Trumeet@users.noreply.github.com> | 2019-04-19 10:47:50 -0700 |
commit | 7a7f1be950f959e208de799483c89291ba7a0119 (patch) | |
tree | 82c4f7da3d65653fa5191f4970b565089f81c6ba | |
parent | 630301cbd9e3d565c5ee687dfd7312f691330b03 (diff) | |
download | OhMySAF-7a7f1be950f959e208de799483c89291ba7a0119.tar OhMySAF-7a7f1be950f959e208de799483c89291ba7a0119.tar.gz OhMySAF-7a7f1be950f959e208de799483c89291ba7a0119.tar.bz2 OhMySAF-7a7f1be950f959e208de799483c89291ba7a0119.zip |
docs: add docs about the extended APIs
Signed-off-by: YuutaW <17158086+Trumeet@users.noreply.github.com>
-rw-r--r-- | README.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -54,6 +54,31 @@ if (theFxxkFile.isFile()) { } ``` +## Extend usages + +Some APIs don't work with `SafFile`. In these cases, you should cast the returned `File` to `SafFile` and use extended APIs. + +```java +SafFile theMagic = OhMySAF.ohMyUri(context, uri); +``` + +### Get Android Uri + +It returns the Android `Uri` and you can do ANYTHING you want with it. + +```java +final Uri uri = theMagic.getAndroidUri(); +``` + +### Open input / output stream + +The Java `FileInputStream` and `FileOutputStream` does not work with the file directly. Talk is cheap, let's show you the code: + +```java +final OutputStream stream = theMagic.openOutputStream(this, "w"); +stream.close(); +``` + # Licenses Apache 2.0
\ No newline at end of file |