Package com.sun.j3d.utils.scenegraph.io
Class SceneGraphStreamReader
java.lang.Object
com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader
Read and create a (set) of Java3D BranchGraphs or Universe from a Java Stream.
-
Constructor Summary
ConstructorsConstructorDescriptionSceneGraphStreamReader
(InputStream stream) Creates new SceneGraphStreamReader and reads the file header information -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the SceneGraphStreamReader streamGet the ClassLoader used to load the scene graph objects and deserialize user datareadBranchGraph
(HashMap namedObjects) Read and return the graph from the stream.Read and create the universe.readUniverse
(Canvas3D canvas) Read and create the universe.void
setClassLoader
(ClassLoader classLoader) Set the ClassLoader used to load the scene graph objects and deserialize user data
-
Constructor Details
-
SceneGraphStreamReader
Creates new SceneGraphStreamReader and reads the file header information- Throws:
IOException
-
-
Method Details
-
readUniverse
Read and create the universe. If the BranchGraphs were written then they will be added to the universe before it is returned.- Throws:
IOException
-
readUniverse
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:
IOException
-
readBranchGraph
Read and return the graph from the stream.namedObjects
map will be updated with any objects that were named during the write process- Throws:
IOException
-
setClassLoader
Set the ClassLoader used to load the scene graph objects and deserialize user data -
getClassLoader
Get the ClassLoader used to load the scene graph objects and deserialize user data -
close
Close the SceneGraphStreamReader stream- Throws:
IOException
- Since:
- Java 3D 1.5.1
-