Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.
/ rio Public archive

Commit

Permalink
#12 - prepare for cqfn
Browse files Browse the repository at this point in the history
  • Loading branch information
g4s8 committed Jul 23, 2020
1 parent 0099546 commit 6d25ced
Show file tree
Hide file tree
Showing 29 changed files with 125 additions and 72 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 g4s8
Copyright (c) 2020 cqfn.org

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
Expand Down
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,28 @@ Reactive Input Output objects for Java:
Add Maven dependency to `pom.xml`:
```xml
<dependency>
<groupId>wtf.g4s8</groupId>
<groupId>org.cqfn</groupId>
<artifactId>rio</artifactId>
<version><!-- see latest release -->
<version><!-- see latest release --></version>
</dependency>
```

Or use snapshot from `central.artipie.com`:
```xml
<repositories>
<repository>
<name>Artipie central</name>
<id>central.artipie.com</id>
<url>https://central.artipie.com/cqfn/maven</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependency>
<groupId>org.cqfn</groupId>
<artifactId>rio</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
```

Expand All @@ -27,8 +46,7 @@ by various methods in main entry points.

To create new reactive file instance use constructor:
```java
import java.nio.file.Paths;
import wtf.g4s8.rio.file.File;


var file = new File(Paths.get("/tmp/my/file.txt"));
```
Expand All @@ -37,9 +55,7 @@ var file = new File(Paths.get("/tmp/my/file.txt"));

To read the file use `Publisher<ByteBuffer> content()` method of `File` object:
```java
import java.nio.file.Paths;
import org.reactivestreams.Publisher;
import wtf.g4s8.rio.file.File;


Publisher<ByteBuffer> content = new File(Paths.get("/tmp/my/file.txt")).content();
```
Expand All @@ -61,9 +77,7 @@ method:

```java

import java.nio.file.Paths;
import org.reactivestreams.Publisher;
import wtf.g4s8.rio.file.File;


CompletionStage<Void> result = new File(Paths.get("/tmp/my/file.txt")).write(data);
```
Expand Down
53 changes: 46 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
MIT License
Copyright (c) 2020 g4s8
Copyright (c) 2020 cqfn.org
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
Expand All @@ -25,32 +25,56 @@ OTHER DEALINGS IN THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>wtf.g4s8</groupId>
<groupId>org.cqfn</groupId>
<artifactId>rio</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>com.artipie</groupId>
<artifactId>ppom</artifactId>
<version>0.3.6</version>
</parent>
<url>https://github.com/g4s8/rio</url>
<url>https://github.com/cqfn/rio</url>
<licenses>
<license>
<name>MIT License</name>
<url>https://github.com/g4s8/rio/blob/master/LICENSE.txt</url>
<url>https://github.com/cqfn/rio/blob/master/LICENSE.txt</url>
</license>
</licenses>
<repositories>
<repository>
<name>Artipie central</name>
<id>central.artipie.com</id>
<url>https://central.artipie.com/cqfn/maven</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<developers>
<developer>
<name>Kirill Che. (g4s8)</name>
<id>g4s8</id>
<name>Kirill Che.</name>
<email>g4s8.public@gmail.com</email>
<url>https://g4s8.wtf</url>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
</developers>
<organization>
<name>CQFN</name>
<url>https://www.cqfn.org</url>
</organization>
<scm>
<connection>scm:git:git://github.com/g4s8/rio.git</connection>
<developerConnection>scm:git:ssh://github.com:g4s8/rio.git</developerConnection>
<url>https://github.com/g4s8/rio/tree/master</url>
<developerConnection>scm:git:ssh://github.com:cqfn/rio.git</developerConnection>
<url>https://github.com/cqfn/rio/tree/master</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/cqfn/rio</url>
</issueManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down Expand Up @@ -207,4 +231,19 @@ OTHER DEALINGS IN THE SOFTWARE.
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>artipie-central</id>
<distributionManagement>
<repository>
<id>artipie-central</id>
<url>https://central.artipie.com/cqfn/maven</url>
</repository>
<snapshotRepository>
<id>artipie-central</id>
<url>https://central.artipie.com/cqfn/maven</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.nio.ByteBuffer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import com.jcabi.log.Logger;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

/**
* Handle all exceptions including unchecked and signal error state to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import com.jcabi.log.Logger;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.util.concurrent.atomic.AtomicBoolean;
import org.reactivestreams.Subscriber;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.nio.ByteBuffer;
import org.reactivestreams.Subscription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import com.jcabi.log.Logger;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.util.concurrent.ExecutorService;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.util.concurrent.atomic.AtomicLong;
import org.reactivestreams.Subscription;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import com.jcabi.log.Logger;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2020 g4s8
* Copyright (c) 2020 cqfn.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
Expand All @@ -22,7 +22,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package wtf.g4s8.rio.file;
package org.cqfn.rio.file;

import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
Expand Down

0 comments on commit 6d25ced

Please sign in to comment.