Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhanghai/androidretrofile
Backport of java.nio.file API (JSR 203) for Android
https://github.com/zhanghai/androidretrofile
android android-library java nio2
Last synced: about 2 months ago
JSON representation
Backport of java.nio.file API (JSR 203) for Android
- Host: GitHub
- URL: https://github.com/zhanghai/androidretrofile
- Owner: zhanghai
- License: gpl-2.0
- Created: 2018-12-10T00:40:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-22T02:02:17.000Z (5 months ago)
- Last Synced: 2024-12-19T04:06:44.571Z (about 2 months ago)
- Topics: android, android-library, java, nio2
- Language: Java
- Size: 288 KB
- Stars: 47
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AndroidRetroFile
A backport of java.nio.file API (JSR 203) for Android.
## Integration
```gradle
dependencies {
implementation 'me.zhanghai.android.retrofile:library:1.2.0'
}
```## Usage
The backported API is under `java8.nio.file`.
No default [`FileSystemProvider`](blob/master/library/src/main/java/java8/nio/file/spi/FileSystemProvider.java) implementation is bundled within this library, and the API is modified to allow dynamic install of providers.
Before using the API, you need to set a default provider implementation with `FileSystemProvider.installDefaultProvider()`. More providers can be installed with `FileSystemProvider.installProvider()` at any time.
Similarly, there is no default [`FileTypeDetector`](blob/master/library/src/main/java/java8/nio/file/spi/FileTypeDetector.java) implementation, and you can install one with `Files.installFileTypeDetector()` at any time.
This backport uses the [default version](https://developer.android.com/studio/write/java11-default-support-table) of [Java 8+ API desugaring support](https://developer.android.com/studio/write/java8-support) for `java.util.stream` and `java.time`.
## License
[GNU General Public License, version 2, with the Classpath Exception](LICENSE)