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 TypeMethodDescriptionreadParticleRecord(DataInputStream in, double factor)
Read a star from the input stream.readParticleRecord(MappedByteBuffer mem, double factor)
Read a star from the mapped buffer.void
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 from.factor
- Scale factor to apply to the positions.- Returns:
- The star.
-
readParticleRecord
Read a star from the input stream.- Parameters:
in
- Input stream.factor
- Scale factor to apply to the positions.- Returns:
- The star.
- Throws:
IOException
- If the read fails.
-
writeParticleRecord
Write the star bean to the output stream.- Parameters:
sb
- The star bean.out
- The output stream.- Throws:
IOException
- If the write operation fails.
-