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 Details

    • readParticleRecord

      ParticleRecord readParticleRecord(MappedByteBuffer mem, double factor)
      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

      ParticleRecord readParticleRecord(DataInputStream in, double factor) throws IOException
      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

      void writeParticleRecord(IParticleRecord sb, DataOutputStream out) throws IOException
      Write the star bean to the output stream.
      Parameters:
      sb - The star bean.
      out - The output stream.
      Throws:
      IOException - If the write operation fails.