-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable,org.readium.r2.shared.util.zip.jvm.ByteChannel,org.readium.r2.shared.util.zip.jvm.Channel,org.readium.r2.shared.util.zip.jvm.ReadableByteChannel,org.readium.r2.shared.util.zip.jvm.SeekableByteChannel,org.readium.r2.shared.util.zip.jvm.WritableByteChannel
public class ZipSplitReadOnlySeekableByteChannel extends MultiReadOnlySeekableByteChannel
MultiReadOnlySeekableByteChannel that knows what a split ZIP archive should look like.
If you want to read a split archive using ZipFile then create an instance of this class from the parts of the archive.
-
-
Constructor Summary
Constructors Constructor Description ZipSplitReadOnlySeekableByteChannel(List<SeekableByteChannel> channels)Concatenates the given channels.
-
Method Summary
Modifier and Type Method Description static SeekableByteChannelforOrderedSeekableByteChannels(Array<SeekableByteChannel> channels)Concatenates the given channels. static SeekableByteChannelforOrderedSeekableByteChannels(SeekableByteChannel lastSegmentChannel, Iterable<SeekableByteChannel> channels)Concatenates the given channels. -
Methods inherited from class org.readium.r2.shared.util.zip.compress.utils.MultiReadOnlySeekableByteChannel
close, forSeekableByteChannels, isOpen, position, position, position, read, size, truncate, write -
Methods inherited from class org.readium.r2.shared.util.zip.jvm.SeekableByteChannel
position, read, truncate, write -
Methods inherited from class java.io.Closeable
close -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ZipSplitReadOnlySeekableByteChannel
ZipSplitReadOnlySeekableByteChannel(List<SeekableByteChannel> channels)
Concatenates the given channels.- Parameters:
channels- the channels to concatenate
-
-
Method Detail
-
forOrderedSeekableByteChannels
static SeekableByteChannel forOrderedSeekableByteChannels(Array<SeekableByteChannel> channels)
Concatenates the given channels.
- Parameters:
channels- the channels to concatenate, note that the LAST CHANNEL of channels should be the LAST SEGMENT(.zip)and theses channels should be added in correct order (e.g.
-
forOrderedSeekableByteChannels
static SeekableByteChannel forOrderedSeekableByteChannels(SeekableByteChannel lastSegmentChannel, Iterable<SeekableByteChannel> channels)
Concatenates the given channels.
- Parameters:
lastSegmentChannel- channel of the last segment of split zip segments, its extension should be .channels- the channels to concatenate except for the last segment,note theses channels should be added in correct order (e.g.
-
-
-
-