Package com.sun.j3d.utils.scenegraph.io
Class SceneGraphStreamReader
- java.lang.Object
-
- com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader
-
public class SceneGraphStreamReader extends java.lang.ObjectRead and create a (set) of Java3D BranchGraphs or Universe from a Java Stream.
-
-
Constructor Summary
Constructors Constructor Description SceneGraphStreamReader(java.io.InputStream stream)Creates new SceneGraphStreamReader and reads the file header information
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the SceneGraphStreamReader streamjava.lang.ClassLoadergetClassLoader()Get the ClassLoader used to load the scene graph objects and deserialize user dataBranchGroupreadBranchGraph(java.util.HashMap namedObjects)Read and return the graph from the stream.ConfiguredUniversereadUniverse()Read and create the universe.ConfiguredUniversereadUniverse(Canvas3D canvas)Read and create the universe.voidsetClassLoader(java.lang.ClassLoader classLoader)Set the ClassLoader used to load the scene graph objects and deserialize user data
-
-
-
Method Detail
-
readUniverse
public ConfiguredUniverse readUniverse() throws java.io.IOException
Read and create the universe. If the BranchGraphs were written then they will be added to the universe before it is returned.- Throws:
java.io.IOException
-
readUniverse
public ConfiguredUniverse readUniverse(Canvas3D canvas) throws java.io.IOException
Read and create the universe. If the BranchGraphs were written then they will be added to the universe before it is returned.- Parameters:
canvas- The Canvas3D to associate with the universe.- Throws:
java.io.IOException
-
readBranchGraph
public BranchGroup readBranchGraph(java.util.HashMap namedObjects) throws java.io.IOException
Read and return the graph from the stream.namedObjectsmap will be updated with any objects that were named during the write process- Throws:
java.io.IOException
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
Set the ClassLoader used to load the scene graph objects and deserialize user data
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Get the ClassLoader used to load the scene graph objects and deserialize user data
-
close
public void close() throws java.io.IOExceptionClose the SceneGraphStreamReader stream- Throws:
java.io.IOException- Since:
- Java 3D 1.5.1
-
-