Package org.h2.store.fs.zip
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 java.nio.channels.FileChannel
FileChannel.MapMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ZipEntry
private final ZipFile
private InputStream
private long
private final long
private long
private static final byte[]
private boolean
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.h2.store.fs.FileBase
lock, map, read, read, transferFrom, transferTo, write, write
Methods inherited from class java.nio.channels.FileChannel
lock, map, open, open, read, tryLock, write
Methods inherited from class java.nio.channels.spi.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:
position
in interfaceSeekableByteChannel
- Specified by:
position
in classFileChannel
-
size
public long size()- Specified by:
size
in interfaceSeekableByteChannel
- Specified by:
size
in classFileChannel
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in interfaceSeekableByteChannel
- Specified by:
read
in classFileChannel
- Throws:
IOException
-
seek
- Throws:
IOException
-
position
- Specified by:
position
in interfaceSeekableByteChannel
- Specified by:
position
in classFileChannel
-
truncate
- Specified by:
truncate
in interfaceSeekableByteChannel
- Specified by:
truncate
in classFileChannel
- Throws:
IOException
-
force
- Overrides:
force
in classFileBase
- Throws:
IOException
-
write
- Specified by:
write
in interfaceSeekableByteChannel
- Specified by:
write
in interfaceWritableByteChannel
- Specified by:
write
in classFileChannel
- Throws:
IOException
-
tryLock
- Overrides:
tryLock
in classFileBase
- Throws:
IOException
-
implCloseChannel
- Overrides:
implCloseChannel
in classFileBase
- Throws:
IOException
-