cn.hutool.core.util.ZipUtil.unGzip()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(724)

本文整理了Java中cn.hutool.core.util.ZipUtil.unGzip()方法的一些代码示例,展示了ZipUtil.unGzip()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipUtil.unGzip()方法的具体详情如下:
包路径:cn.hutool.core.util.ZipUtil
类名称:ZipUtil
方法名:unGzip

ZipUtil.unGzip介绍

[英]Gzip解压处理
[中]Gzip解压处理

代码示例

代码示例来源:origin: looly/hutool

/**
 * Gzip解压处理
 * 
 * @param in Gzip数据
 * @return 解压后的数据
 * @throws UtilException IO异常
 */
public static byte[] unGzip(InputStream in) throws UtilException {
  return unGzip(in, DEFAULT_BYTE_ARRAY_LENGTH);
}

代码示例来源:origin: looly/hutool

/**
 * Gzip解压处理
 * 
 * @param in Gzip数据
 * @return 解压后的数据
 * @throws UtilException IO异常
 */
public static byte[] unGzip(InputStream in) throws UtilException {
  return unGzip(in, DEFAULT_BYTE_ARRAY_LENGTH);
}

代码示例来源:origin: looly/hutool

/**
 * Gzip解压处理
 * 
 * @param buf buf
 * @return bytes
 * @throws UtilException IO异常
 */
public static byte[] unGzip(byte[] buf) throws UtilException {
  return unGzip(new ByteArrayInputStream(buf), buf.length);
}

代码示例来源:origin: looly/hutool

/**
 * Gzip解压处理
 * 
 * @param buf buf
 * @return bytes
 * @throws UtilException IO异常
 */
public static byte[] unGzip(byte[] buf) throws UtilException {
  return unGzip(new ByteArrayInputStream(buf), buf.length);
}

代码示例来源:origin: looly/hutool

/**
 * Gzip解压缩处理
 * 
 * @param buf 压缩过的字节流
 * @param charset 编码
 * @return 解压后的字符串
 * @throws UtilException IO异常
 */
public static String unGzip(byte[] buf, String charset) throws UtilException {
  return StrUtil.str(unGzip(buf), charset);
}

代码示例来源:origin: looly/hutool

/**
 * Gzip解压缩处理
 * 
 * @param buf 压缩过的字节流
 * @param charset 编码
 * @return 解压后的字符串
 * @throws UtilException IO异常
 */
public static String unGzip(byte[] buf, String charset) throws UtilException {
  return StrUtil.str(unGzip(buf), charset);
}

代码示例来源:origin: cn.hutool/hutool-all

/**
 * Gzip解压处理
 * 
 * @param in Gzip数据
 * @return 解压后的数据
 * @throws UtilException IO异常
 */
public static byte[] unGzip(InputStream in) throws UtilException {
  return unGzip(in, DEFAULT_BYTE_ARRAY_LENGTH);
}

代码示例来源:origin: cn.hutool/hutool-all

/**
 * Gzip解压处理
 * 
 * @param buf buf
 * @return bytes
 * @throws UtilException IO异常
 */
public static byte[] unGzip(byte[] buf) throws UtilException {
  return unGzip(new ByteArrayInputStream(buf), buf.length);
}

代码示例来源:origin: cn.hutool/hutool-all

/**
 * Gzip解压缩处理
 * 
 * @param buf 压缩过的字节流
 * @param charset 编码
 * @return 解压后的字符串
 * @throws UtilException IO异常
 */
public static String unGzip(byte[] buf, String charset) throws UtilException {
  return StrUtil.str(unGzip(buf), charset);
}

相关文章