📄 scenegraphstreamwriter.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Apr 18 11:17:02 PDT 2003 --><TITLE>SceneGraphStreamWriter (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="SceneGraphStreamWriter (Java 3D API)";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphStreamReader.html"><B>PREV CLASS</B></A> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/UnresolvedBehavior.html"><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> <A HREF="SceneGraphStreamWriter.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.sun.j3d.utils.scenegraph.io</FONT><BR>Class SceneGraphStreamWriter</H2><PRE>java.lang.Object | +--<B>com.sun.j3d.utils.scenegraph.io.SceneGraphStreamWriter</B></PRE><HR><DL><DT>public class <B>SceneGraphStreamWriter</B><DT>extends java.lang.Object</DL><P>Writes a Java3D SceneGraph to a Java OutputStream.<p> Using this class to write to a FileOutputStream is not recommended. Use SceneGraphFileWriter instead to achieve maximum performance and flexibility.<P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphStreamWriter.html#SceneGraphStreamWriter(java.io.OutputStream)">SceneGraphStreamWriter</A></B>(java.io.OutputStream outputStream)</CODE><BR> Creates new SceneGraphStreamWriter that will write to the supplied stream</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphStreamWriter.html#close()">close</A></B>()</CODE><BR> Close the SceneGraphStreamWriter, but does not close the Stream</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphStreamWriter.html#writeBranchGraph(javax.media.j3d.BranchGroup, java.util.HashMap)">writeBranchGraph</A></B>(<A HREF="../../../../../../javax/media/j3d/BranchGroup.html">BranchGroup</A> graph, java.util.HashMap namedObjects)</CODE><BR> Write the entire graph to the stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphStreamWriter.html#writeUniverse(com.sun.j3d.utils.universe.SimpleUniverse, boolean)">writeUniverse</A></B>(<A HREF="../../../../../../com/sun/j3d/utils/universe/SimpleUniverse.html">SimpleUniverse</A> universe, boolean writeContent)</CODE><BR> Write <code>universe</code> to the Stream.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="SceneGraphStreamWriter(java.io.OutputStream)"><!-- --></A><H3>SceneGraphStreamWriter</H3><PRE>public <B>SceneGraphStreamWriter</B>(java.io.OutputStream outputStream) throws java.io.IOException</PRE><DL><DD>Creates new SceneGraphStreamWriter that will write to the supplied stream<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="writeUniverse(com.sun.j3d.utils.universe.SimpleUniverse, boolean)"><!-- --></A><H3>writeUniverse</H3><PRE>public void <B>writeUniverse</B>(<A HREF="../../../../../../com/sun/j3d/utils/universe/SimpleUniverse.html">SimpleUniverse</A> universe, boolean writeContent) throws java.io.IOException, <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/UnsupportedUniverseException.html">UnsupportedUniverseException</A></PRE><DL><DD>Write <code>universe</code> to the Stream.<p> If <code>writeContent</code> is true then all BranchGraphs attached to the universe will be saved. If it is false then only the universe data structures will be output (PlatformGeometry, ViewerAvatar, Locales, and the MultiTransformGroup between the ViewingPlatform and the View).<p> If <code>writeContent</code> is true then all the BranchGraphs attached to the Locales of the universe must have the ALLOW_DETACH capability set. If they do not, a <code>CapabilityNotSetException</code> will be thrown<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>universe</CODE> - The universe to write<DD><CODE>writeContent</CODE> - Flag enabling the BranchGraphs to be written<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE><DD><CODE><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/UnsupportedUniverseException.html">UnsupportedUniverseException</A></CODE> - Thrown if the universe class is not supported by this implementation</DL></DD></DL><HR><A NAME="writeBranchGraph(javax.media.j3d.BranchGroup, java.util.HashMap)"><!-- --></A><H3>writeBranchGraph</H3><PRE>public void <B>writeBranchGraph</B>(<A HREF="../../../../../../javax/media/j3d/BranchGroup.html">BranchGroup</A> graph, java.util.HashMap namedObjects) throws java.io.IOException, <A HREF="../../../../../../javax/media/j3d/DanglingReferenceException.html">DanglingReferenceException</A>, <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/NamedObjectException.html">NamedObjectException</A></PRE><DL><DD>Write the entire graph to the stream.<p> The API will correctly handle NodeComponents that are shared between seperate graphs. However Nodes cannot be referenced in other Graphs.<p> If a reference to a Node in another graph is encountered a DanglingReferenceException will be thrown. <code>namedObjects</code> can contain a mapping between a key and a SceneGraphObject in the graph. During the read process this can be used to locate nodes in the graph.<P><DD><DL><DD><CODE>java.io.IOException</CODE><DD><CODE><A HREF="../../../../../../javax/media/j3d/DanglingReferenceException.html">DanglingReferenceException</A></CODE><DD><CODE><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/NamedObjectException.html">NamedObjectException</A></CODE></DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>() throws java.io.IOException</PRE><DL><DD>Close the SceneGraphStreamWriter, but does not close the Stream<P><DD><DL><DD><CODE>java.io.IOException</CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphStreamReader.html"><B>PREV CLASS</B></A> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/UnresolvedBehavior.html"><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> <A HREF="SceneGraphStreamWriter.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -