public class RandomAccessFileControl extends Controller
| Modifier and Type | Field and Description |
|---|---|
protected String |
FILE_IDENT |
BG_DIR_PTR, BRANCH_GRAPH_COUNT, classLoader, currentFileVersion, FILE_DESCRIPTION, NAMES_OBJECTS_TABLE_PTR, NODE_TYPES_PTR, nullObject, outputFileVersion, SYMBOL_TABLE_PTR, symbolTable, UNIVERSE_CONFIG_PTR| Constructor and Description |
|---|
RandomAccessFileControl()
Creates new RandomAccessFileControl
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createFile(File file,
SimpleUniverse universe,
boolean writeUniverseContent,
String description,
Serializable userData)
Create the file and write the inital header information
|
int |
getBranchGraphCount()
Return the number of branchgraphs in the file
|
int |
getBranchGraphPosition(BranchGroup graph)
Given a branchgraph, return the corresponding index of the graph
in the file.
|
long |
getFilePointer()
Get the current file 'pointer' location.
|
Object |
getUserData() |
void |
loadNodeComponent(SymbolTableData symbol)
Used by SymbolTable to load a node component that is not in current
graph
|
void |
loadSharedGroup(SymbolTableData symbol)
Loads the specified SharedGroup
|
void |
openFile(File file)
Open the file for reading
|
BranchGroup[] |
readAllBranchGraphs()
Read and return all the graphs in the file
|
BranchGroup[] |
readBranchGraph(int graphID) |
protected void |
readBranchGraphs(int[] graphs)
Read the set of branchgraps.
|
Object |
readBranchGraphUserData(int graphID) |
String |
readFileDescription() |
protected void |
readNodeComponents(DataInput in)
Read in all the node components in this block
|
ConfiguredUniverse |
readUniverse(boolean attachBranchGraphs,
Canvas3D canvas) |
void |
writeBranchGraph(BranchGroup bg,
Serializable userData) |
protected void |
writeNodeComponents(DataOutput out)
Write all the unsaved NodeComponents and SharedGroups to DataOutput.
|
void |
writeObject(DataOutput out,
SceneGraphObjectState obj) |
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, writePoint3d, writePoint3f, writeQuat4f, writeSerializedData, writeSharedGroup, writeTransform3D, writeTuple3d, writeTuple3f, writeTuple4d, writeTuple4f, writeUniverse, writeVector3f, writeVector4d, writeVector4fprotected String FILE_IDENT
public RandomAccessFileControl()
public void createFile(File file, SimpleUniverse universe, boolean writeUniverseContent, String description, Serializable userData) throws IOException, UnsupportedUniverseException, CapabilityNotSetException
public void openFile(File file) throws IOException
IOExceptionpublic ConfiguredUniverse readUniverse(boolean attachBranchGraphs, Canvas3D canvas) throws IOException
IOExceptionpublic Object getUserData()
protected void readBranchGraphs(int[] graphs)
throws IOException
readBranchGraphs in class ControllerIOExceptionpublic int getBranchGraphCount()
public void writeBranchGraph(BranchGroup bg, Serializable userData) throws IOException
writeBranchGraph in class ControllerIOExceptionpublic BranchGroup[] readBranchGraph(int graphID) throws IOException
IOExceptionpublic BranchGroup[] readAllBranchGraphs() throws IOException
IOExceptionpublic Object readBranchGraphUserData(int graphID) throws IOException
IOExceptionprotected void writeNodeComponents(DataOutput out) throws IOException
writeNodeComponents in class ControllerIOExceptionprotected void readNodeComponents(DataInput in) throws IOException
readNodeComponents in class ControllerIOExceptionpublic void writeObject(DataOutput out, SceneGraphObjectState obj) throws IOException
writeObject in class ControllerIOExceptionpublic String readFileDescription() throws IOException
IOExceptionpublic void loadNodeComponent(SymbolTableData symbol) throws IOException
IOExceptionpublic void loadSharedGroup(SymbolTableData symbol) throws IOException
IOExceptionpublic void close()
throws IOException
close in class ControllerIOExceptionpublic long getFilePointer()
ControllergetFilePointer in class Controllerpublic int getBranchGraphPosition(BranchGroup graph)
Copyright © 2016–2022 SciJava. All rights reserved.