java.util.zip.GZIPOutputStream翻译_wocongdongfanglai的博客-程序员秘密

技术标签: output  stream  documentation  deprecated  技术翻译  class  parameters  

 
JavaTM 2 Platform
Std. Ed. v1.4.2

java.util.zip
Class GZIPOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byjava.util.zip.DeflaterOutputStream
              extended byjava.util.zip.GZIPOutputStream

public class GZIPOutputStream extends DeflaterOutputStream

This class implements a stream filter for writing compressed data in the GZIP file format. 实现以GZIP格式写入压缩数据的流过滤器的类。


Field Summary
protected  CRC32 crc
          CRC-32 of uncompressed data. 用于解压数据的CRC-32。
 
Fields inherited from class java.util.zip.DeflaterOutputStream
buf, def
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
GZIPOutputStream(OutputStream out)
          Creates a new output stream with a default buffer size. 使用默认缓冲大小创建输出流。
GZIPOutputStream(OutputStream out, int size)
          Creates a new output stream with the specified buffer size. 使用指定缓冲大小创建输出流。
 
Method Summary
 void finish()
          Finishes writing compressed data to the output stream without closing the underlying stream. 完成已压缩数据对输出流的写入但不关闭底层流。
 void write(byte[] buf, int off, int len)
          Writes array of bytes to the compressed output stream. 将字节数组写入压缩输出流。
 
Methods inherited from class java.util.zip.DeflaterOutputStream
close, deflate, write
 
Methods inherited from class java.io.FilterOutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crc

protected CRC32 crc
CRC-32 of uncompressed data. 用于解压数据的CRC-32。

Constructor Detail

GZIPOutputStream

public GZIPOutputStream(OutputStream out,
                        int size)
                 throws IOException
Creates a new output stream with the specified buffer size. 使用指定缓冲大小创建输出流。

Parameters:
out - the output stream 输出流
size - the output buffer size 输出缓冲大小
Throws:
IOException - If an I/O error has occurred. 如果发生I/O错误抛出。
IllegalArgumentException - if size is <= 0 如果大小<= 0抛出

GZIPOutputStream

public GZIPOutputStream(OutputStream out)
                 throws IOException
Creates a new output stream with a default buffer size. 使用默认缓冲大小创建输出流。

Parameters:
out - the output stream 输出流
Throws:
IOException - If an I/O error has occurred. 如果发生I/O错误抛出。
Method Detail

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws IOException
Writes array of bytes to the compressed output stream. This method will block until all the bytes are written. 将字节数组写入压缩输出流。方法阻塞直到所有字节被写入。

Overrides:
write in class DeflaterOutputStream
Parameters:
buf - the data to be written 要写入的数据
off - the start offset of the data 数据的起始偏移
len - the length of the data 数据大小
Throws:
IOException - If an I/O error has occurred. 如果发生I/O错误抛出。

finish

public void finish()
            throws IOException
Finishes writing compressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream. 完成已压缩数据对输出流的写入但不关闭底层流。当在同一个输出流上连续应用多个过滤器时使用此方法。

Overrides:
finish in class DeflaterOutputStream
Throws:
IOException - if an I/O error has occurred 如果发生I/O错误抛出

JavaTM 2 Platform
Std. Ed. v1.4.2

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation . That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/wocongdongfanglai/article/details/409233

智能推荐

用C语言实现简单菜单_c语言菜_elifefly的博客-程序员秘密

通过本实例简单了解C语言实现菜单的基本原理。实例中没有什么过多深入的东西,仅仅是简单实现基本的菜单。 本实例是查询航班时刻表: /************************************************************************/ /*C语言实现 */ /*运行环境:VC++6.0                        

两个排序的数组,找到第k大的元素_jiyanfeng1的博客-程序员秘密

给你两个排序的数组,A和B,大小分别是 m 和 n。找到把 A和B 归并后的数组中,第k大的元素。(假定没有重复元素)。The trivial way, O(m + n):Merge both arrays and the k-th smallest element could be accessed directly. Merging would require extra sp

SequoiaDB+Spark搭建医院临床知识库系统_SequoiaDBOfficial的博客-程序员秘密

SequoiaDB+Spark利用医院现有的历史就诊记录、处方、诊断、病历数据,挖掘出有价值的基于统计学的医学规则、知识,并基于这些规则、知识信息构建专业的临床知识库,为一线医务人员提供专业的诊断、处方、用药推荐功能,基于强大的关联推荐能力,极大的提高医疗服务质量,减轻一线医疗人员的工作强度。

Wampserver 下载安装——踩坑总结_wampserver下载很慢_qwe122343的博客-程序员秘密

接触到 php,安装 Wampserver 比较方便,没想到安装这个软件还踩了一些坑Wampserver 下载与安装下载嫌麻烦的小伙伴直接复制我 Wampserver 2.5 下载的地址:https://jaist.dl.sourceforge.net/project/wampserver/WampServer%202/Wampserver%202.5/wampserver2.5-Apache...

博客搬家系列(一)-简介_博客园中博客搬家功能_rico_zhou的博客-程序员秘密

这个功能思来想去想了很久,终于实现了基本功能,自己基于别人的后台权限管理系统写了一个博客系统,其实博客系统只是一小部分,但今天只讲博客部分,其他详见:RZSpider详见:https://blog.csdn.net/rico_zhou/article/details/83618255    https://www.rzspider.top      U:testadmin   P:testad...

keil中自己定义的枚举报错error: #101: “RS485_TX“ has already been declared in the current scope_super尚的博客-程序员秘密

因为是把62行的#endif放到了55行那里 导致后边的自己写的东西报错。把#endif放最后就好了

随便推点

windows 10下Anaconda3安装与OpenCV4.0.1环境搭建_漫悠悠的博客-程序员秘密

windows 10下Anaconda3安装与OpenCV4.0.1环境搭建本文介绍win7和win10系统下通过Anaconda配置基于python语言的机器视觉编程环境(博主测试了两个系统下的安装基本相同),主要内容包括:Anaconda下载安装 OpenCV下载安装 测试安装结果1.Anaconda下载与安装1.1 Anaconda简介官方网址:https://www....

WIN10电脑桌面整理及其壁纸应用推荐_weixin_30535565的博客-程序员秘密

桌面高清动态壁纸:Wallpaper-Engin破解版百度云提取码:bm9v桌面整理工具:https://guanjia.qq.com/product/zmzl/我发的是永久链接,但是如果链接失效,请留言,我会再发。1.桌面壁纸个人感受动态壁纸支持自己设计,只不过是破解版的,不能与Steam联机,内存占用少,特别好用,我自己又添加了50章动态壁纸是由wallpaper-maker提供的,...

WampServer下载及安装相关问题-程序员秘密

输入网址:https://sourceforge.net/projects/wampserver/files/依次点击"Files",“WampServer 3”,进入文件详情页。点击X64的exe文件由于网上下载速度实在太慢,所有直接通过qq接收了别人传的安装包安装过程选择默认即可下面这个点击“否”下载完成后,还是打不开先卸载原有安装包,下载Visual C++ Redistributable2012插件网址为:https://www.microsoft

不少于30行的matlab程序设计,matlab中for循环_weixin_39805644的博客-程序员秘密

Matlab软件与基础数学实验 MATLAB编程介绍与循环结构 ★ MATLAB中各种命令可以完成许多单一的任务,对于某些较为复杂的问题,仅靠现有的命令或函数来解决,往 往是难以......Matlab 软件实习 循环语句 1. for-end循环 格式: for 循环变量=初值:步长:终值 循环体语句组 end [注] 步长为1时,可省略. . Matlab 软件实习例7: 编程生......例...

安装Kiabna 版本一定要对应_霸气工作室的博客-程序员秘密

ElasticSearch 5学习(1)——安装Elasticsearch、Kibana和X-Pack安装准备:安装Elasticsearch唯一的要求是安装官方新版的Java,包括对应的Jdk。安装Elasticsearch首先到官网下载最新版本的Elasticsearch压缩包。可以使用命令,注意将最新的可用的下载链接填入:curl -L -O https://art...

Linux/Unix time时间戳的处理转换函数_weixin_33963594的博客-程序员秘密

我们在编程中可能会经常用到时间,比如取得系统的时间(获取系统的年、月、日、时、分、秒,星期等),或者是隔一段时间去做某事,那么我们就用到一些时间函数。linux下存储时间常见的有两种存储方式,一个是从1970年到现在经过了多少秒,一个是用一个结构来分别存储年月日时分秒的。time_t 这种类型就是用来存储从1970年到现在经过了多少秒,要想更精确一点...

推荐文章

热门文章

相关标签