swfwriter.html

来自「java和flash接口编程」· HTML 代码 · 共 725 行 · 第 1/2 页

HTML
725
字号
</DL>
</DL>
<HR>

<A NAME="mByteout"><!-- --></A><H3>
mByteout</H3>
<PRE>
protected java.io.ByteArrayOutputStream <B>mByteout</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="mSignature"><!-- --></A><H3>
mSignature</H3>
<PRE>
protected java.lang.String <B>mSignature</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="recalculateLengthAndCount"><!-- --></A><H3>
recalculateLengthAndCount</H3>
<PRE>
protected boolean <B>recalculateLengthAndCount</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="frameCount"><!-- --></A><H3>
frameCount</H3>
<PRE>
protected int <B>frameCount</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="version"><!-- --></A><H3>
version</H3>
<PRE>
protected int <B>version</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="frameSize"><!-- --></A><H3>
frameSize</H3>
<PRE>
protected <A HREF="../../../../com/anotherbigidea/flash/structs/Rect.html" title="class in com.anotherbigidea.flash.structs">Rect</A> <B>frameSize</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="height"><!-- --></A><H3>
height</H3>
<PRE>
protected int <B>height</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="rate"><!-- --></A><H3>
rate</H3>
<PRE>
protected int <B>rate</B></PRE>
<DL>
<DL>
</DL>
</DL>

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

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

<A NAME="SWFWriter(java.lang.String)"><!-- --></A><H3>
SWFWriter</H3>
<PRE>
public <B>SWFWriter</B>(java.lang.String&nbsp;filename)
          throws java.io.IOException</PRE>
<DL>
<DD>Write to a file.
<P>
<DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DL>
<HR>

<A NAME="SWFWriter(java.io.OutputStream)"><!-- --></A><H3>
SWFWriter</H3>
<PRE>
public <B>SWFWriter</B>(java.io.OutputStream&nbsp;outputstream)</PRE>
<DL>
<DD>Write to an output stream - closing it at the end.
<P>
</DL>
<HR>

<A NAME="SWFWriter(com.anotherbigidea.io.OutStream)"><!-- --></A><H3>
SWFWriter</H3>
<PRE>
public <B>SWFWriter</B>(<A HREF="../../../../com/anotherbigidea/io/OutStream.html" title="class in com.anotherbigidea.io">OutStream</A>&nbsp;outstream)</PRE>
<DL>
<DD>Write to an out stream - closing it at the end.
<P>
</DL>

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

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

<A NAME="recalculateLengthAndCount()"><!-- --></A><H3>
recalculateLengthAndCount</H3>
<PRE>
public void <B>recalculateLengthAndCount</B>()</PRE>
<DL>
<DD>Sets a flag such that the SWF length and frame count will be set to unknown when they are passed in the header - this forces those values to be recalculated.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="signature(java.lang.String)"><!-- --></A><H3>
signature</H3>
<PRE>
public void <B>signature</B>(java.lang.String&nbsp;sig)</PRE>
<DL>
<DD>Sets the file signature if it has not been set already. The setCompression(..) method calls this and thus prevents any further changes to the signature - overriding any signature passed down from the SWFReader.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFFileSignature.html#signature(java.lang.String)">signature</A></CODE> in interface <CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFFileSignature.html" title="interface in com.anotherbigidea.flash.interfaces">SWFFileSignature</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sig</CODE> - the 3 char signature - one of the SIGNATURE_* constants.<DT><B>See Also:</B><DD><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFFileSignature.html#signature(java.lang.String)"><CODE>SWFFileSignature.signature(String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setCompression(boolean)"><!-- --></A><H3>
setCompression</H3>
<PRE>
public void <B>setCompression</B>(boolean&nbsp;compressionOn)</PRE>
<DL>
<DD>Set Flash MX+ zip-compression on or off.   It sets the file signature and thus prevents any different signature from being specified.  Only the first call to this method has any effect, and only if signature(..) has not been called yet.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>compressionOn</CODE> - true for compression, false for no compression.</DL>
</DD>
</DL>
<HR>

<A NAME="header(int, long, int, int, int, int)"><!-- --></A><H3>
header</H3>
<PRE>
public void <B>header</B>(int&nbsp;version,
                   long&nbsp;length,
                   int&nbsp;twipsWidth,
                   int&nbsp;twipsHeight,
                   int&nbsp;frameRate,
                   int&nbsp;frameCount)
            throws java.io.IOException</PRE>
<DL>
<DD>Writes the header unless the length or framecount are unknown (as signified by a negative value), in which case the header values are stored and written later, when the unknown value(s) can be determined.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFHeader.html#header(int, long, int, int, int, int)">header</A></CODE> in interface <CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFHeader.html" title="interface in com.anotherbigidea.flash.interfaces">SWFHeader</A></CODE></DL>
</DD>
<DD><DL>
<DD><CODE>length</CODE> - -1 if the length is unknown and must be inferred<DD><CODE>frameCount</CODE> - -1 if the framecount is unknown and must be inferred
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFHeader.html#header(int, long, int, int, int, int)"><CODE>SWFHeader.header(int, long, int, int, int, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="tag(int, boolean, byte[])"><!-- --></A><H3>
tag</H3>
<PRE>
public void <B>tag</B>(int&nbsp;tagType,
                boolean&nbsp;longTag,
                byte[]&nbsp;contents)
         throws java.io.IOException</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFTags.html#tag(int, boolean, byte[])">SWFTags</A></CODE></B></DD>
<DD>A SWF tag.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFTags.html#tag(int, boolean, byte[])">tag</A></CODE> in interface <CODE><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFTags.html" title="interface in com.anotherbigidea.flash.interfaces">SWFTags</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tagType</CODE> - a type of zero (TAG_END) denotes the end of the tags<DD><CODE>longTag</CODE> - true if the tag header is forced into the long form<DD><CODE>contents</CODE> - may be null
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../../com/anotherbigidea/flash/interfaces/SWFTags.html#tag(int, boolean, byte[])"><CODE>SWFTags.tag(int, boolean, byte[])</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="writeHeader(int, long, int, int)"><!-- --></A><H3>
writeHeader</H3>
<PRE>
protected void <B>writeHeader</B>(int&nbsp;version,
                           long&nbsp;length,
                           int&nbsp;frameRate,
                           int&nbsp;frameCount)
                    throws java.io.IOException</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="finish()"><!-- --></A><H3>
finish</H3>
<PRE>
protected void <B>finish</B>()
               throws java.io.IOException</PRE>
<DL>
<DD>Finish writing
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()</PRE>
<DL>
<DD>Force close of output stream(s) - this is not normally necessary since normal completion of writing a SWF will close the output.  This method can be called in case of abnormal termination to ensure that the output stream or file is closed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</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=2 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/SWFWriter.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-all.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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/anotherbigidea/flash/writers/SWFTagTypesImpl.html" title="class in com.anotherbigidea.flash.writers"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/anotherbigidea/flash/writers/TagWriter.html" title="class in com.anotherbigidea.flash.writers"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/anotherbigidea/flash/writers/SWFWriter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SWFWriter.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="#field_summary">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;<A HREF="#field_detail">FIELD</A>&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>
<i>Copyright &#169; 2000-2005 David N Main. All Rights Reserved.</i>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?