java.util.jar.JarOutputStream翻译

类别:Java 点击:0 评论:0 推荐:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2-rc) on Fri Jun 13 00:14:46 PDT 2003 -->
<TITLE>
JarOutputStream (Java 2 Platform SE v1.4.2)
</TITLE>

<META NAME="keywords" CONTENT="java.util.jar.JarOutputStream class">
<META NAME="keywords" CONTENT="putNextEntry()">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="JarOutputStream (Java 2 Platform SE v1.4.2)";
}
</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JarOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.4.2</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../java/util/jar/JarInputStream.html" title="class in java.util.jar"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../java/util/jar/Manifest.html" title="class in java.util.jar"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="JarOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.util.zip.ZipOutputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
java.util.jar</FONT>
<BR>
Class JarOutputStream</H2>
<PRE>
<A HREF="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../java/io/OutputStream.html" title="class in java.io">java.io.OutputStream</A>
      <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../java/io/FilterOutputStream.html" title="class in java.io">java.io.FilterOutputStream</A>
          <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../java/util/zip/DeflaterOutputStream.html" title="class in java.util.zip">java.util.zip.DeflaterOutputStream</A>
              <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../java/util/zip/ZipOutputStream.html" title="class in java.util.zip">java.util.zip.ZipOutputStream</A>
                  <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>java.util.jar.JarOutputStream</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.util.zip.ZipConstants</DD>
</DL>
<HR>
<DL>
<DT>public class <B>JarOutputStream</B><DT>extends <A HREF="../../../java/util/zip/ZipOutputStream.html" title="class in java.util.zip">ZipOutputStream</A></DL>

<P>
The <code>JarOutputStream</code> class is used to write the contents
 of a JAR file to any output stream. It extends the class
 <code>java.util.zip.ZipOutputStream</code> with support
 for writing an optional <code>Manifest</code> entry. The
 <code>Manifest</code> can be used to specify meta-information about
 the JAR file and its entries.
 JarOutputStream类被用来向任何输出流中写入JAR文件的内容,继承自类java.util.zip.ZipOutputStream,支持写入可选的Manifest项。 Manifest被用来存储JAR文件及其项的特定元信息。
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../java/util/jar/Manifest.html" title="class in java.util.jar"><CODE>Manifest</CODE></A>,
<A HREF="../../../java/util/zip/ZipOutputStream.html" title="class in java.util.zip"><CODE>ZipOutputStream</CODE></A></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_java.util.zip.ZipOutputStream"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class java.util.zip.<A HREF="../../../java/util/zip/ZipOutputStream.html" title="class in java.util.zip">ZipOutputStream</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/util/zip/ZipOutputStream.html#CENATT">CENATT</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENATX">CENATX</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENCOM">CENCOM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENCRC">CENCRC</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENDSK">CENDSK</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENEXT">CENEXT</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENFLG">CENFLG</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENHDR">CENHDR</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENHOW">CENHOW</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENLEN">CENLEN</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENNAM">CENNAM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENOFF">CENOFF</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENSIG">CENSIG</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENSIZ">CENSIZ</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENTIM">CENTIM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENVEM">CENVEM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#CENVER">CENVER</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#DEFLATED">DEFLATED</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDCOM">ENDCOM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDHDR">ENDHDR</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDOFF">ENDOFF</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDSIG">ENDSIG</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDSIZ">ENDSIZ</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDSUB">ENDSUB</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#ENDTOT">ENDTOT</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#EXTCRC">EXTCRC</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#EXTHDR">EXTHDR</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#EXTLEN">EXTLEN</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#EXTSIG">EXTSIG</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#EXTSIZ">EXTSIZ</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCCRC">LOCCRC</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCEXT">LOCEXT</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCFLG">LOCFLG</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCHDR">LOCHDR</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCHOW">LOCHOW</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCLEN">LOCLEN</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCNAM">LOCNAM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCSIG">LOCSIG</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCSIZ">LOCSIZ</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCTIM">LOCTIM</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#LOCVER">LOCVER</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#STORED">STORED</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_java.util.zip.DeflaterOutputStream"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class java.util.zip.<A HREF="../../../java/util/zip/DeflaterOutputStream.html" title="class in java.util.zip">DeflaterOutputStream</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/util/zip/DeflaterOutputStream.html#buf">buf</A>, <A HREF="../../../java/util/zip/DeflaterOutputStream.html#def">def</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class java.io.<A HREF="../../../java/io/FilterOutputStream.html" title="class in java.io">FilterOutputStream</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/io/FilterOutputStream.html#out">out</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../java/util/jar/JarOutputStream.html#JarOutputStream(java.io.OutputStream)">JarOutputStream</A></B>(<A HREF="../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A>&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>JarOutputStream</code> with no manifest.
创建不含声明的JarOutputStream。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../java/util/jar/JarOutputStream.html#JarOutputStream(java.io.OutputStream, java.util.jar.Manifest)">JarOutputStream</A></B>(<A HREF="../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A>&nbsp;out,
                <A HREF="../../../java/util/jar/Manifest.html" title="class in java.util.jar">Manifest</A>&nbsp;man)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>JarOutputStream</code> with the specified
 <code>Manifest</code>. 创建指定Manifest的JarOutputStream。</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../java/util/jar/JarOutputStream.html#putNextEntry(java.util.zip.ZipEntry)">putNextEntry</A></B>(<A HREF="../../../java/util/zip/ZipEntry.html" title="class in java.util.zip">ZipEntry</A>&nbsp;ze)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begins writing a new JAR file entry and positions the stream
 to the start of the entry data. 开始写入一个新的JAR文件项,并把流定位在项数据的开始位置。</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.zip.ZipOutputStream"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.util.zip.<A HREF="../../../java/util/zip/ZipOutputStream.html" title="class in java.util.zip">ZipOutputStream</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/util/zip/ZipOutputStream.html#close()">close</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#closeEntry()">closeEntry</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#finish()">finish</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#setComment(java.lang.String)">setComment</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#setLevel(int)">setLevel</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#setMethod(int)">setMethod</A>, <A HREF="../../../java/util/zip/ZipOutputStream.html#write(byte[], int, int)">write</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.util.zip.DeflaterOutputStream"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.util.zip.<A HREF="../../../java/util/zip/DeflaterOutputStream.html" title="class in java.util.zip">DeflaterOutputStream</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/util/zip/DeflaterOutputStream.html#deflate()">deflate</A>, <A HREF="../../../java/util/zip/DeflaterOutputStream.html#write(int)">write</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.io.<A HREF="../../../java/io/FilterOutputStream.html" title="class in java.io">FilterOutputStream</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/io/FilterOutputStream.html#flush()">flush</A>, <A HREF="../../../java/io/FilterOutputStream.html#write(byte[])">write</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html" title="class in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="JarOutputStream(java.io.OutputStream, java.util.jar.Manifest)"><!-- --></A><H3>
JarOutputStream</H3>
<PRE>
public <B>JarOutputStream</B>(<A HREF="../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A>&nbsp;out,
                       <A HREF="../../../java/util/jar/Manifest.html" title="class in java.util.jar">Manifest</A>&nbsp;man)
                throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Creates a new <code>JarOutputStream</code> with the specified
 <code>Manifest</code>. The manifest is written as the first
 entry to the output stream. 创建指定Manifest的JarOutputStream。声明作为输出流的第一个项写入。
<P>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the actual output stream 实际输出流<DD><CODE>man</CODE> - the optional <code>Manifest</code> 可选的Manifest
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error has occurred 如果发生I/O错误时抛出</DL>
<HR>

<A NAME="JarOutputStream(java.io.OutputStream)"><!-- --></A><H3>
JarOutputStream</H3>
<PRE>
public <B>JarOutputStream</B>(<A HREF="../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A>&nbsp;out)
                throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Creates a new <code>JarOutputStream</code> with no manifest. 创建不含声明的JarOutputStream。
<P>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the actual output stream 实际输出流
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error has occurred 如果发生I/O错误时抛出</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="putNextEntry(java.util.zip.ZipEntry)"><!-- --></A><H3>
putNextEntry</H3>
<PRE>
public void <B>putNextEntry</B>(<A HREF="../../../java/util/zip/ZipEntry.html" title="class in java.util.zip">ZipEntry</A>&nbsp;ze)
                  throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Begins writing a new JAR file entry and positions the stream
 to the start of the entry data. This method will also close
 any previous entry. The default compression method will be
 used if no compression method was specified for the entry.
 The current time will be used if the entry has no set modification
 time.
  开始写入一个新的JAR文件项,并把流定位在项数据的开始位置。该方法同时关闭前一项。如果不指定该项的压缩方法,将采用默认的压缩方法。
  如果该项没有设置修改时间将使用当前时间。
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/util/zip/ZipOutputStream.html#putNextEntry(java.util.zip.ZipEntry)">putNextEntry</A></CODE> in class <CODE><A HREF="../../../java/util/zip/ZipOutputStream.html" title="class in java.util.zip">ZipOutputStream</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ze</CODE> - the ZIP/JAR entry to be written 被写入的ZIP/JAR项
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/util/zip/ZipException.html" title="class in java.util.zip">ZipException</A></CODE> - if a ZIP error has occurred 如果发生ZIP错误时抛出
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error has occurred 如果发生I/O错误时抛出</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JarOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.4.2</b></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../java/util/jar/JarInputStream.html" title="class in java.util.jar"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../java/util/jar/Manifest.html" title="class in java.util.jar"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="JarOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.util.zip.ZipOutputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="../../../../relnotes/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../../relnotes/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font>
</BODY>
</HTML>

本文地址:http://com.8s8s.com/it/it10235.htm