Class RiffSeekableByteChannels

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.channels.SeekableByteChannel createFromChannel​(java.nio.channels.SeekableByteChannel channel, long lower, long upper)
      Create a restricted byte channel from the given existing channel.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RiffSeekableByteChannels

        public RiffSeekableByteChannels()
        Construct a provider.
    • Method Detail

      • createFromChannel

        public java.nio.channels.SeekableByteChannel createFromChannel​(java.nio.channels.SeekableByteChannel channel,
                                                                       long lower,
                                                                       long upper)
        Description copied from interface: RiffSeekableByteChannelsType
        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.
        Specified by:
        createFromChannel in interface RiffSeekableByteChannelsType
        Parameters:
        channel - The base channel
        lower - The absolute, inclusive lower bound of the new channel
        upper - The absolute, exclusive upper bound of the new channel
        Returns:
        A new byte channel