Package com.io7m.jspiel.api
Interface RiffSeekableByteChannelsType
- All Known Implementing Classes:
RiffSeekableByteChannels
public interface RiffSeekableByteChannelsType
A provider of seekable byte channels.
-
Method Summary
Modifier and TypeMethodDescriptioncreateFromChannel
(SeekableByteChannel channel, long lower, long upper) Create a restricted byte channel from the given existing channel.
-
Method Details
-
createFromChannel
Create a restricted byte channel from the given existing channel. The returned byte channel is limited to accessing data in the range[lower, upper)
expressed as offsets in the base channel. If the base channel was readable, the new channel will be readable. If the base channel was writable, the new channel will be writable. The new channel is configured such that a read/write from/to positions[0, upper - lower]
in the new channel will equate to a read/write to/from positions[lower, upper]
in the base channel. Closing the new channel will not close the base channel.- Parameters:
channel
- The base channellower
- The absolute, inclusive lower bound of the new channelupper
- The absolute, exclusive upper bound of the new channel- Returns:
- A new byte channel
-