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

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

本文整理了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

  1. /**
  2. * Gzip解压处理
  3. *
  4. * @param in Gzip数据
  5. * @return 解压后的数据
  6. * @throws UtilException IO异常
  7. */
  8. public static byte[] unGzip(InputStream in) throws UtilException {
  9. return unGzip(in, DEFAULT_BYTE_ARRAY_LENGTH);
  10. }

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

  1. /**
  2. * Gzip解压处理
  3. *
  4. * @param in Gzip数据
  5. * @return 解压后的数据
  6. * @throws UtilException IO异常
  7. */
  8. public static byte[] unGzip(InputStream in) throws UtilException {
  9. return unGzip(in, DEFAULT_BYTE_ARRAY_LENGTH);
  10. }

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

  1. /**
  2. * Gzip解压处理
  3. *
  4. * @param buf buf
  5. * @return bytes
  6. * @throws UtilException IO异常
  7. */
  8. public static byte[] unGzip(byte[] buf) throws UtilException {
  9. return unGzip(new ByteArrayInputStream(buf), buf.length);
  10. }

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

  1. /**
  2. * Gzip解压处理
  3. *
  4. * @param buf buf
  5. * @return bytes
  6. * @throws UtilException IO异常
  7. */
  8. public static byte[] unGzip(byte[] buf) throws UtilException {
  9. return unGzip(new ByteArrayInputStream(buf), buf.length);
  10. }

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

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

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

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

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

  1. /**
  2. * Gzip解压处理
  3. *
  4. * @param in Gzip数据
  5. * @return 解压后的数据
  6. * @throws UtilException IO异常
  7. */
  8. public static byte[] unGzip(InputStream in) throws UtilException {
  9. return unGzip(in, DEFAULT_BYTE_ARRAY_LENGTH);
  10. }

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

  1. /**
  2. * Gzip解压处理
  3. *
  4. * @param buf buf
  5. * @return bytes
  6. * @throws UtilException IO异常
  7. */
  8. public static byte[] unGzip(byte[] buf) throws UtilException {
  9. return unGzip(new ByteArrayInputStream(buf), buf.length);
  10. }

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

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

相关文章