Package gaiasky.data.octreegen
Class StarGroupSerializedIO
- java.lang.Object
-
- gaiasky.data.octreegen.StarGroupSerializedIO
-
- All Implemented Interfaces:
IStarGroupIO
public class StarGroupSerializedIO extends java.lang.Object implements IStarGroupIO
Loads and writes star groups using java's defaultObjectOutputStream
andObjectInputStream
throughSerializedDataProvider
-
-
Constructor Summary
Constructors Constructor Description StarGroupSerializedIO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<SceneGraphNode>
readParticles(java.io.InputStream in)
Reads a single star group from the given input stream.java.util.List<SceneGraphNode>
readParticles(java.io.InputStream in, boolean compat)
void
writeParticles(java.util.List<SceneGraphNode> list, java.io.OutputStream out)
Writes the list to the output stream.void
writeParticles(java.util.List<SceneGraphNode> list, java.io.OutputStream out, boolean compat)
-
-
-
Method Detail
-
writeParticles
public void writeParticles(java.util.List<SceneGraphNode> list, java.io.OutputStream out)
Writes the list to the output stream. The list must contain a single star group.- Specified by:
writeParticles
in interfaceIStarGroupIO
- Parameters:
list
- The list with the star group to writeout
- The output stream to write to
-
writeParticles
public void writeParticles(java.util.List<SceneGraphNode> list, java.io.OutputStream out, boolean compat)
- Specified by:
writeParticles
in interfaceIStarGroupIO
-
readParticles
public java.util.List<SceneGraphNode> readParticles(java.io.InputStream in) throws java.io.FileNotFoundException
Reads a single star group from the given input stream.- Specified by:
readParticles
in interfaceIStarGroupIO
- Parameters:
in
- The input stream to read the star group from- Returns:
- A list with a single star group object
- Throws:
java.io.FileNotFoundException
-
readParticles
public java.util.List<SceneGraphNode> readParticles(java.io.InputStream in, boolean compat) throws java.io.FileNotFoundException
- Specified by:
readParticles
in interfaceIStarGroupIO
- Throws:
java.io.FileNotFoundException
-
-