Class FileZip
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.h2.store.fs.FileBase
org.h2.store.fs.zip.FileZip
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, SeekableByteChannel, WritableByteChannel
The file is read from a stream. When reading from start to end, the same
input stream is re-used, however when reading from end to start, a new input
stream is opened for each request.
-
Nested Class Summary
Nested classes/interfaces inherited from class FileChannel
FileChannel.MapMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ZipEntryprivate final ZipFileprivate InputStreamprivate longprivate final longprivate longprivate static final byte[]private boolean -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FileBase
lock, map, read, read, transferFrom, transferTo, write, writeMethods inherited from class AbstractInterruptibleChannel
begin, close, end, isOpen
-
Field Details
-
SKIP_BUFFER
private static final byte[] SKIP_BUFFER -
file
-
entry
-
pos
private long pos -
in
-
inPos
private long inPos -
length
private final long length -
skipUsingRead
private boolean skipUsingRead
-
-
Constructor Details
-
FileZip
-
-
Method Details
-
position
public long position()- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileChannel
-
size
public long size()- Specified by:
sizein interfaceSeekableByteChannel- Specified by:
sizein classFileChannel
-
read
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Specified by:
readin classFileChannel- Throws:
IOException
-
seek
- Throws:
IOException
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileChannel
-
truncate
- Specified by:
truncatein interfaceSeekableByteChannel- Specified by:
truncatein classFileChannel- Throws:
IOException
-
force
- Overrides:
forcein classFileBase- Throws:
IOException
-
write
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- Specified by:
writein classFileChannel- Throws:
IOException
-
tryLock
- Overrides:
tryLockin classFileBase- Throws:
IOException
-
implCloseChannel
- Overrides:
implCloseChannelin classFileBase- Throws:
IOException
-