All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.leeonky.dal.extensions.basic.zip.util.ZipFileFileGroup Maven / Gradle / Ivy

There is a newer version: 0.7.4
Show newest version
package com.github.leeonky.dal.extensions.basic.zip.util;

import com.github.leeonky.dal.extensions.basic.file.util.FileGroup;

import java.io.InputStream;
import java.util.stream.Stream;

public class ZipFileFileGroup extends FileGroup {
    private final ZipNodeCollection zipNodeCollection;

    public ZipFileFileGroup(ZipNodeCollection zipNode, String name) {
        super(name);
        zipNodeCollection = zipNode;
    }

    @Override
    protected InputStream open(ZipBinary.ZipNode subFile) {
        return subFile.open();
    }

    @Override
    protected ZipBinary.ZipNode createSubFile(String fileName) {
        return zipNodeCollection.createSub(fileName);
    }

    @Override
    protected Stream listFileName() {
        return zipNodeCollection.list().stream();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy