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

com.github.fartherp.framework.compress.shell.GzipCompressShell Maven / Gradle / Ivy

There is a newer version: 3.0.6
Show newest version
/*
 * Copyright (c) 2017. CK. All rights reserved.
 */

package com.github.fartherp.framework.compress.shell;

import com.github.fartherp.framework.common.util.Tools;

/**
 * 

gzip压缩解压 在aix5测试通过

* * @author cyq */ public class GzipCompressShell extends CompressShell { /** * @param sourceFile 源文件 */ public void gzip(String sourceFile) { try { Tools.executeShell("gzip -f " + sourceFile); } catch (Exception e) { throw new RuntimeException(e); } } /** * @param sourceFile 源文件 包括路径 */ public void unGzip(String sourceFile) { try { Tools.executeShell("gzip -d -f " + sourceFile); } catch (Exception e) { throw new RuntimeException(e); } } public void compress(String source) { validation(source); gzip(source); } public void unCompress(String source) { validation(source); unGzip(source); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy