类 BaseZip

java.lang.Object
com.weicoder.common.zip.base.BaseZip
所有已实现的接口:
Zip
直接已知子类:
GzipImpl, ZipImpl, ZlibImpl

public abstract class BaseZip extends Object implements Zip
基础压缩实现
作者:
WD
  • 构造器详细资料

    • BaseZip

      public BaseZip()
  • 方法详细资料

    • compress

      public byte[] compress(byte[] b)
      从接口复制的说明: Zip
      压缩数据
      指定者:
      compress 在接口中 Zip
      参数:
      b - 字节数组
      返回:
      压缩后的字节数组
    • extract

      public byte[] extract(byte[] b)
      从接口复制的说明: Zip
      解压数据
      指定者:
      extract 在接口中 Zip
      参数:
      b - 压缩字节
      返回:
      解压后数据
    • compress

      public ByteArrayOutputStream compress(InputStream in)
      从接口复制的说明: Zip
      压缩数据
      指定者:
      compress 在接口中 Zip
      参数:
      in - 要压缩的输入流
      返回:
      压缩后的字节输出流
    • extract

      public ByteArrayOutputStream extract(InputStream in)
      从接口复制的说明: Zip
      解压数据
      指定者:
      extract 在接口中 Zip
      参数:
      in - 要解压的输入流
      返回:
      解压后的字节输出流
    • compress

      public <E extends OutputStream> E compress(InputStream in, E out)
      从接口复制的说明: Zip
      压缩数据
      指定者:
      compress 在接口中 Zip
      参数:
      in - 要压缩的输入流
      out - 压缩的输出流
    • extract

      public <E extends OutputStream> E extract(InputStream in, E out)
      从接口复制的说明: Zip
      解压数据
      指定者:
      extract 在接口中 Zip
      参数:
      in - 要解缩的输入流
      out - 解压的输出流
    • is

      protected abstract InputStream is(InputStream in) throws Exception
      根据子类实现生成解压流
      参数:
      in - 字节输入流
      返回:
      抛出:
      Exception
    • os

      protected abstract OutputStream os(OutputStream os) throws Exception
      根据子类实现生成压缩流
      参数:
      os - 字节输出流
      返回:
      抛出:
      Exception