Package gaiasky.data.group
Interface BinaryIO
- All Known Implementing Classes:
BinaryIOBase,BinaryVersion0,BinaryVersion1,BinaryVersion2
public interface BinaryIO
Interface to read and write stars, to be implemented by different binary format versions
-
Method Summary
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 Details
-
readParticleRecord
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.IOExceptionRead 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.IOExceptionWrite the star bean to the output stream- Parameters:
sb- The star beanout- The output stream- Throws:
java.io.IOException
-