Decorative site banner
Project icon

com.io7m.wendover

  • About
  • Releases
  • Manual
  • Sources
  • License
  • Issues
Maven Central Version Maven Snapshot Code Coverage

wendover


The wendover package provides extra classes for working with Java NIO channels.

Features


  • Numerous Channel classes and adapters with various properties.
  • High coverage test suite.
  • OSGi-ready.
  • JPMS-ready.
  • ISC license.

Usage


CloseShieldSeekableByteChannel


Use CloseShieldSeekableByteChannel in order to prevent external code from closing an arbitrary SeekableByteChannel instance:

SeekableByteChannel c; someUntrustedObject.run(new CloseShieldSeekableByteChannel(c));

The CloseShieldSeekableByteChannel instance can be closed, but will not result in the underlying channel really being closed.

ReadOnlySeekableByteChannel


Use ReadOnlySeekableByteChannel to protect an arbitrary SeekableByteChannel instance against writes:

SeekableByteChannel c; someUntrustedObject.run(new ReadOnlySeekableByteChannel(c));

Attempts to write to the ReadOnlySeekableByteChannel will result in NonWritableChannelException being thrown.

SubrangeSeekableByteChannel


Use SubrangeSeekableByteChannel to restrict reads and writes to an arbitrary SeekableByteChannel instance to a particular range:

SeekableByteChannel c; someObject.run(new SubrangeSeekableByteChannel(c, 100L, 1000L));

Reads of the SubrangeSeekableByteChannel instance will be limited to only reading data that falls within offsets [100, 100 + 1000 - 1]. Reading at position 0 of the SubrangeSeekableByteChannel instance will actually read from position 100 of c. Writes are similarly translated and limited.

UpperRangeTrackingSeekableByteChannel


Use UpperRangeTrackingSeekableByteChannel to track the uppermost point written by an arbitrary SeekableByteChannel instance:

SeekableByteChannel c; var d = new UpperRangeTrackingSeekableByteChannel(c); someObject.run(d); System.out.println(d.uppermostWritten());

ByteBufferChannels


Use the ByteBufferChannels class to adapt a ByteBuffer into a SeekableByteChannel:

ByteBuffer data; SeekableByteChannel c = ByteBufferChannels.ofByteBuffer(data);

DelegatingSeekableByteChannel


Use the DelegatingSeekableByteChannel class to delegate operations to an existing channel. This class is used to implement most of the wendover package.

Releases & Development Snapshots


Releases


You can subscribe to the atom feed to be notified of project releases.

The most recently released version of the package is 1.0.2.

1.0.2 Release (2024-05-12Z)

  • Update junit.version:5.10.1 → 5.10.2.
  • Update org.slf4j:slf4j-api:2.0.10 → 2.0.13.
  • Update net.bytebuddy:byte-buddy:1.14.11 → 1.14.13.
  • Update ch.qos.logback:logback-classic:1.4.14 → 1.5.6.
  • Update net.bytebuddy:byte-buddy-agent:1.14.11 → 1.14.13.
  • Update org.mockito:mockito-core:5.8.0 → 5.11.0.
  • Update net.bytebuddy:byte-buddy:1.14.13 → 1.14.14.
  • Update net.bytebuddy:byte-buddy-agent:1.14.13 → 1.14.14.
  • Update net.bytebuddy:byte-buddy:1.14.14 → 1.14.15.
  • Update net.bytebuddy:byte-buddy-agent:1.14.14 → 1.14.15.
  • Update org.mockito:mockito-core:5.11.0 → 5.12.0.
  • Move to new organization.

The compiled artifacts for the release (and all previous releases) are available on Maven Central.

Maven Modules


<dependency> <group>com.io7m.wendover</group> <artifactId>com.io7m.wendover.tests</artifactId> <version>1.0.2</version> </dependency><dependency> <group>com.io7m.wendover</group> <artifactId>com.io7m.wendover.core</artifactId> <version>1.0.2</version> </dependency>

Previous Releases


The changelogs for the most recent previous releases are as follows:

1.0.1 Release (2023-07-01Z)

1.0.0 Release (2023-07-01Z)

Development Snapshots


At the time of writing, the current unstable development version of the package is 1.0.3-SNAPSHOT.

Development snapshots may be available in the Central Portal Snapshots repository. Snapshots are published to this repository every time the project is built by the project's continuous integration system, but snapshots do expire after around ninety days and so may or may not be available depending on when a build of the package was last triggered.

Manual


This project does not have any user manuals or other documentation beyond what might be present on the page above.

Sources


This project uses Git to manage source code.

Repository: https://www.github.com/io7m-com/wendover

$ git clone --recursive https://www.github.com/io7m-com/wendover

Issues


This project uses GitHub Issues to track issues.

License


Copyright © 2023 Mark Raynsford <code@io7m.com> https://www.io7m.com Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Last Updated 2025-08-09T14:58:58Z