com.sun.j3d.utils.scenegraph.io.retained
Class StreamControl

java.lang.Object
  extended by com.sun.j3d.utils.scenegraph.io.retained.Controller
      extended by com.sun.j3d.utils.scenegraph.io.retained.StreamControl

public class StreamControl
extends Controller

Provides the infrastructure for ScenGraphStream Reader and Writer


Constructor Summary
StreamControl(java.io.DataInputStream in)
           
StreamControl(java.io.DataOutputStream out)
           
 
Method Summary
 void addNamedObjects(java.util.HashMap namedObjects)
          Add the named objects to the symbol table
 void close()
           
 long getFilePointer()
          Implementation of abstract method from Controller.
 void loadNodeComponent(SymbolTableData symbol)
          Used by SymbolTable to load a node component that is not in current graph
 javax.media.j3d.BranchGroup readBranchGraph(java.util.HashMap namedObjects)
           
 void readStreamHeader()
           
 void writeBranchGraph(javax.media.j3d.BranchGroup bg, java.io.Serializable userData)
          The BranchGraph userData is not supported in a stream and will be ignored.
 void writeStreamHeader()
          Prepare the Stream for writing, by sending header information
 
Methods inherited from class com.sun.j3d.utils.scenegraph.io.retained.Controller
addNamedObject, createState, createState, createState, getClassLoader, getCurrentFileVersion, getImageCompression, getNamedObject, getNames, getNodeClassFromID, getNodeClassID, getOutputFileVersion, getSymbolTable, readBounds, readColor3f, readColor4f, readMatrix4d, readObject, readPoint3d, readPoint3f, readQuat4f, readSerializedData, readSharedGroup, readTransform3D, readTuple3d, readTuple3f, readTuple4d, readTuple4f, readUniverse, readVector3f, readVector4d, readVector4f, reset, setClassLoader, skipUserData, useSuperClassIfNoChildClass, writeBounds, writeColor3f, writeColor4f, writeMatrix4d, writeObject, writePoint3d, writePoint3f, writeQuat4f, writeSerializedData, writeSharedGroup, writeTransform3D, writeTuple3d, writeTuple3f, writeTuple4d, writeTuple4f, writeUniverse, writeVector3f, writeVector4d, writeVector4f
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamControl

public StreamControl(java.io.DataOutputStream out)

StreamControl

public StreamControl(java.io.DataInputStream in)
Method Detail

writeStreamHeader

public void writeStreamHeader()
                       throws java.io.IOException
Prepare the Stream for writing, by sending header information

Throws:
java.io.IOException

readStreamHeader

public void readStreamHeader()
                      throws java.io.IOException
Throws:
java.io.IOException

addNamedObjects

public void addNamedObjects(java.util.HashMap namedObjects)
Add the named objects to the symbol table


writeBranchGraph

public void writeBranchGraph(javax.media.j3d.BranchGroup bg,
                             java.io.Serializable userData)
                      throws java.io.IOException
The BranchGraph userData is not supported in a stream and will be ignored. However the data in the userData field of the BranchGroup will be stored in the stream

Specified by:
writeBranchGraph in class Controller
Throws:
java.io.IOException

readBranchGraph

public javax.media.j3d.BranchGroup readBranchGraph(java.util.HashMap namedObjects)
                                            throws java.io.IOException
Throws:
java.io.IOException

loadNodeComponent

public void loadNodeComponent(SymbolTableData symbol)
                       throws java.io.IOException
Used by SymbolTable to load a node component that is not in current graph

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in class Controller
Throws:
java.io.IOException

getFilePointer

public long getFilePointer()
Implementation of abstract method from Controller. Always returns 0

Specified by:
getFilePointer in class Controller