class UnzipFileIO extends AbstractFileIO {
    /** Zip input stream. */
    private final ZipInputStream zis;

    /** Byte array for draining data. */
    private final byte[] arr = new byte[128 * 1024];

    /** Size of uncompressed data. */
    private final long size;

    /** Total bytes read counter. */
    private long totalBytesRead = 0;

    /**
     * @param zip Compressed file.
     */
    public UnzipFileIO(File zip) throws IOException {
        zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(zip)));

        ZipEntry entry = zis.getNextEntry();
        size = entry.getSize();
    }

    /** {@inheritDoc} */
    @Override public int getFileSystemBlockSize() {
        return -1;
    }

    /** {@inheritDoc} */
    @Override public long getSparseSize() {
        return -1;
    }

    /** {@inheritDoc} */
    @Override public int punchHole(long position, int len) {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public long position() throws IOException {
        return totalBytesRead;
    }

    /** {@inheritDoc} */
    @Override public void position(long newPosition) throws IOException {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public int read(ByteBuffer dstBuf) throws IOException {
        int bytesRead = zis.read(arr, 0, Math.min(dstBuf.remaining(), arr.length));

        if (bytesRead == -1)
            return -1;

        dstBuf.put(arr, 0, bytesRead);

        totalBytesRead += bytesRead;

        return bytesRead;
    }

    /** {@inheritDoc} */
    @Override public int read(ByteBuffer dstBuf, long position) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public int read(byte[] buf, int off, int len) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public int write(ByteBuffer srcBuf) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public int write(ByteBuffer srcBuf, long position) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public int write(byte[] buf, int off, int len) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public void force() throws IOException {
        force(false);
    }

    /** {@inheritDoc} */
    @Override public void force(boolean withMetadata) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public long size() throws IOException {
        return size;
    }

    /** {@inheritDoc} */
    @Override public void clear() throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public MappedByteBuffer map(int sizeBytes) throws IOException {
        throw new UnsupportedOperationException();
    }

    /** {@inheritDoc} */
    @Override public void close() throws IOException {
        zis.close();
    }
}

        if (newPosition == totalBytesRead)
            return;

        if (newPosition < totalBytesRead)
            throw new UnsupportedOperationException("Seeking backwards is not supported.");

        long bytesRemaining = newPosition - totalBytesRead;

        while (bytesRemaining > 0) {
            int bytesToRead = bytesRemaining > arr.length ? arr.length : (int)bytesRemaining;

            bytesRemaining -= zis.read(arr, 0, bytesToRead);
        }
    
<methods>public non-sealed void <init>() ,public int readFully(java.nio.ByteBuffer) throws java.io.IOException,public int readFully(java.nio.ByteBuffer, long) throws java.io.IOException,public int readFully(byte[], int, int) throws java.io.IOException,public int writeFully(java.nio.ByteBuffer) throws java.io.IOException,public int writeFully(java.nio.ByteBuffer, long) throws java.io.IOException,public int writeFully(byte[], int, int) throws java.io.IOException<variables>private static final int MAX_IO_TIMEOUT_MS