|
1 | | -ERROR com.io7m.ghrepostools.Main : The specified command does not exist. |
2 | | - Command : README |
3 | | - Error Code : command-nonexistent |
4 | | - |
5 | | -DEBUG com.io7m.ghrepostools.Main : Exception: |
6 | | -com.io7m.quarrel.core.QException: The specified command does not exist. |
7 | | - at com.io7m.quarrel.core.QApplication.parseExpanded(QApplication.java:244) |
8 | | - at com.io7m.quarrel.core.QApplication.parse(QApplication.java:152) |
9 | | - at com.io7m.quarrel.core.QApplicationType.run(QApplicationType.java:94) |
10 | | - at com.io7m.ghrepostools.Main.run(Main.java:126) |
11 | | - at com.io7m.ghrepostools.Main.mainExitless(Main.java:110) |
12 | | - at com.io7m.ghrepostools.Main.main(Main.java:95) |
| 1 | +wendover |
| 2 | +=== |
| 3 | + |
| 4 | +[](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.io7m.wendover%22) |
| 5 | +[](https://central.sonatype.com/repository/maven-snapshots/com/io7m/wendover/) |
| 6 | +[](https://codecov.io/gh/io7m-com/wendover) |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +| JVM | Platform | Status | |
| 12 | +|-----|----------|--------| |
| 13 | +| OpenJDK (Temurin) Current | Linux | [](https://www.github.com/io7m-com/wendover/actions?query=workflow%3Amain.linux.temurin.current)| |
| 14 | +| OpenJDK (Temurin) LTS | Linux | [](https://www.github.com/io7m-com/wendover/actions?query=workflow%3Amain.linux.temurin.lts)| |
| 15 | +| OpenJDK (Temurin) Current | Windows | [](https://www.github.com/io7m-com/wendover/actions?query=workflow%3Amain.windows.temurin.current)| |
| 16 | +| OpenJDK (Temurin) LTS | Windows | [](https://www.github.com/io7m-com/wendover/actions?query=workflow%3Amain.windows.temurin.lts)| |
| 17 | + |
| 18 | +## Repository Relocation |
| 19 | + |
| 20 | +Development of this project has moved to an |
| 21 | +[open-source but not open-contribution](https://sqlite.org/copyright.html#notopencontrib) |
| 22 | +model. |
| 23 | + |
| 24 | +Source code and commits will remain publicly available perpetually, but issues |
| 25 | +and/or pull requests will be rejected and/or ignored. Additionally, this project |
| 26 | +will now only be available via a read-only mirror at: |
| 27 | + |
| 28 | + https://codeberg.org/io7m-com/wendover |
| 29 | + |
| 30 | + |
| 31 | +## wendover |
| 32 | + |
| 33 | +The `wendover` package provides extra classes for working with Java NIO |
| 34 | +channels. |
| 35 | + |
| 36 | +## Features |
| 37 | + |
| 38 | +* Numerous `Channel` classes and adapters with various properties. |
| 39 | +* High coverage test suite. |
| 40 | +* [OSGi-ready](https://www.osgi.org/). |
| 41 | +* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System). |
| 42 | +* ISC license. |
| 43 | + |
| 44 | +## Usage |
| 45 | + |
| 46 | +### CloseShieldSeekableByteChannel |
| 47 | + |
| 48 | +Use `CloseShieldSeekableByteChannel` in order to prevent external code from |
| 49 | +closing an arbitrary `SeekableByteChannel` instance: |
| 50 | + |
| 51 | +``` |
| 52 | +SeekableByteChannel c; |
| 53 | +
|
| 54 | +someUntrustedObject.run(new CloseShieldSeekableByteChannel(c)); |
| 55 | +``` |
| 56 | + |
| 57 | +The `CloseShieldSeekableByteChannel` instance can be closed, but will not |
| 58 | +result in the underlying channel really being closed. |
| 59 | + |
| 60 | +### ReadOnlySeekableByteChannel |
| 61 | + |
| 62 | +Use `ReadOnlySeekableByteChannel` to protect an arbitrary `SeekableByteChannel` |
| 63 | +instance against writes: |
| 64 | + |
| 65 | +``` |
| 66 | +SeekableByteChannel c; |
| 67 | +
|
| 68 | +someUntrustedObject.run(new ReadOnlySeekableByteChannel(c)); |
| 69 | +``` |
| 70 | + |
| 71 | +Attempts to write to the `ReadOnlySeekableByteChannel` will result in |
| 72 | +`NonWritableChannelException` being thrown. |
| 73 | + |
| 74 | +### SubrangeSeekableByteChannel |
| 75 | + |
| 76 | +Use `SubrangeSeekableByteChannel` to restrict reads and writes to an arbitrary |
| 77 | +`SeekableByteChannel` instance to a particular range: |
| 78 | + |
| 79 | +``` |
| 80 | +SeekableByteChannel c; |
| 81 | +
|
| 82 | +someObject.run(new SubrangeSeekableByteChannel(c, 100L, 1000L)); |
| 83 | +``` |
| 84 | + |
| 85 | +Reads of the `SubrangeSeekableByteChannel` instance will be limited to only |
| 86 | +reading data that falls within offsets `[100, 100 + 1000 - 1]`. Reading at |
| 87 | +position `0` of the `SubrangeSeekableByteChannel` instance will actually |
| 88 | +read from position `100` of `c`. Writes are similarly translated and limited. |
| 89 | + |
| 90 | +### UpperRangeTrackingSeekableByteChannel |
| 91 | + |
| 92 | +Use `UpperRangeTrackingSeekableByteChannel` to track the uppermost point |
| 93 | +written by an arbitrary `SeekableByteChannel` instance: |
| 94 | + |
| 95 | +``` |
| 96 | +SeekableByteChannel c; |
| 97 | +
|
| 98 | +var d = new UpperRangeTrackingSeekableByteChannel(c); |
| 99 | +
|
| 100 | +someObject.run(d); |
| 101 | +
|
| 102 | +System.out.println(d.uppermostWritten()); |
| 103 | +``` |
| 104 | + |
| 105 | +### ByteBufferChannels |
| 106 | + |
| 107 | +Use the `ByteBufferChannels` class to adapt a `ByteBuffer` into a |
| 108 | +`SeekableByteChannel`: |
| 109 | + |
| 110 | +``` |
| 111 | +ByteBuffer data; |
| 112 | +
|
| 113 | +SeekableByteChannel c = ByteBufferChannels.ofByteBuffer(data); |
| 114 | +``` |
| 115 | + |
| 116 | +### DelegatingSeekableByteChannel |
| 117 | + |
| 118 | +Use the `DelegatingSeekableByteChannel` class to delegate operations to an |
| 119 | +existing channel. This class is used to implement most of the `wendover` |
| 120 | +package. |
| 121 | + |
0 commit comments