<commit_before># RxFileUtils (Android)

Collection of Utility for the Android File System

## Usage

##### Read File from `assets/` Folder:

```java
        RxFileUtils.readFileFromAsset(this, "hello_world.txt")
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.computation())
                .subscribe(new Observer<String>() {
                    @Override
                    public void onCompleted() {
                        Timber.d("onCompleted()");
                    }

                    @Override
                    public void onError(Throwable e) {
                        Timber.e(e, "onError()");
                    }

                    @Override
                    public void onNext(String s) {
                        //Timber.i("onNext(%s)", s.trim());
                        textView.setText(s);
                    }
                });

```

##### Write to Internal storage:

```java
RxFileUtils.writeInternal(this, "hello_test.txt", "test test test")
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new Observer<Void>() {
                    @Override
                    public void onCompleted() {
                        Timber.i("Write internal complete");
                    }

                    @Override
                    public void onError(Throwable e) {
                        Timber.e(e, "onError");
                    }

                    @Override
                    public void onNext(Object o) {
                        Timber.i("Write internal complete");
                    }
                });
```

##### Read from Internal storage:

```java
RxFileUtils.readInternal(this, "hello_test.txt")
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new Observer<String>() {
                    @Override
                    public void onCompleted() {
                        Timber.i("onCompleted");
                    }

                    @Override
                    public void onError(Throwable e) {
                        Timber.e(e, "onError");
                    }

                    @Override
                    public void onNext(String s) {
                        Timber.i("Internal File onNext(%s)", s);
                    }
                });
```


## License

Copyright 2016 <NAME>
<commit_msg>chore (Readme): download instructions<commit_after># RxFileUtils (Android)

Collection of Utility for the Android File System

## Usage

##### Read File from `assets/` Folder:

```java
        RxFileUtils.readFileFromAsset(this, "hello_world.txt")
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.computation())
                .subscribe(new Observer<String>() {
                    @Override
                    public void onCompleted() {
                        Timber.d("onCompleted()");
                    }

                    @Override
                    public void onError(Throwable e) {
                        Timber.e(e, "onError()");
                    }

                    @Override
                    public void onNext(String s) {
                        //Timber.i("onNext(%s)", s.trim());
                        textView.setText(s);
                    }
                });

```

##### Write to Internal storage:

```java
RxFileUtils.writeInternal(this, "hello_test.txt", "test test test")
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new Observer<Void>() {
                    @Override
                    public void onCompleted() {
                        Timber.i("Write internal complete");
                    }

                    @Override
                    public void onError(Throwable e) {
                        Timber.e(e, "onError");
                    }

                    @Override
                    public void onNext(Object o) {
                        Timber.i("Write internal complete");
                    }
                });
```

##### Read from Internal storage:

```java
RxFileUtils.readInternal(this, "hello_test.txt")
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new Observer<String>() {
                    @Override
                    public void onCompleted() {
                        Timber.i("onCompleted");
                    }

                    @Override
                    public void onError(Throwable e) {
                        Timber.e(e, "onError");
                    }

                    @Override
                    public void onNext(String s) {
                        Timber.i("Internal File onNext(%s)", s);
                    }
                });
```

## Download

##### Gradle:

```java
allprojects {
	repositories {
		maven { url "https://jitpack.io" }
	}
}
```

```java
dependencies {
	        compile 'com.github.wengelef:RxFileUtils:1.1.1'
}
```

## License

Copyright 2016 <NAME>

{'fraction_non_alphanumeric': 0.1101711209382811, 'fraction_numerical': 0.0021149778888675257, 'mean_word_length': 1.1558226274347285, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1606373', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1194, 'n_words': 247}