Package gaiasky.data.group
Interface BinaryIO
-
- All Known Implementing Classes:
BinaryIOBase,BinaryVersion0,BinaryVersion1,BinaryVersion2
public interface BinaryIOInterface to read and write stars, to be implemented by different binary format versions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParticleRecordreadParticleRecord(java.io.DataInputStream in, double factor)Read a star from the input streamParticleRecordreadParticleRecord(java.nio.MappedByteBuffer mem, double factor)Read a star from the mapped buffervoidwriteParticleRecord(IParticleRecord sb, java.io.DataOutputStream out)Write the star bean to the output stream
-
-
-
Method Detail
-
readParticleRecord
ParticleRecord readParticleRecord(java.nio.MappedByteBuffer mem, double factor)
Read a star from the mapped buffer- Parameters:
mem- Mapped memory buffer to read fromfactor- Scale factor to apply to positions- Returns:
- The star
-
readParticleRecord
ParticleRecord readParticleRecord(java.io.DataInputStream in, double factor) throws java.io.IOException
Read a star from the input stream- Parameters:
in- Input streamfactor- Scale factor to apply to positions- Returns:
- The star
- Throws:
java.io.IOException
-
writeParticleRecord
void writeParticleRecord(IParticleRecord sb, java.io.DataOutputStream out) throws java.io.IOException
Write the star bean to the output stream- Parameters:
sb- The star beanout- The output stream- Throws:
java.io.IOException
-
-