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

com.panayotis.jupidator.elements.compression.GZipCompression Maven / Gradle / Ivy

Go to download

A library/tool in Java for automatic updating of applications with minimum user interaction and small developer effort. This is the main library. Use this in your projects.

There is a newer version: 0.9.0.2
Show newest version
/*
 *
 * This file is part of Jupidator.
 *
 * Jupidator is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2.
 *
 *
 * Jupidator is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Jupidator; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package com.panayotis.jupidator.elements.compression;

import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;

/**
 *
 * @author teras
 */
public class GZipCompression extends SingleFileCompression {

    private final String extension;

    public GZipCompression(String extension) {
        this.extension = "." + extension;
    }

    public String getFilenameExtension() {
        return extension;
    }

    @Override
    protected InputStream getCompressedStream(InputStream in) throws IOException {
        return new GZIPInputStream(in);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy