Class BinaryIOBase

java.lang.Object
gaiasky.data.group.BinaryIOBase
All Implemented Interfaces:
BinaryIO
Direct Known Subclasses:
BinaryVersion0, BinaryVersion2

public abstract class BinaryIOBase extends Object implements BinaryIO
Base implementation of binary version, which accommodates most versions.
  • Field Details

    • nDoubles

      protected final int nDoubles
    • nFloats

      protected final int nFloats
    • tychoIds

      protected boolean tychoIds
  • Constructor Details

    • BinaryIOBase

      protected BinaryIOBase(int nDoubles, int nFloats, boolean tychoIds)
  • Method Details

    • readParticleRecord

      public ParticleRecord readParticleRecord(MappedByteBuffer mem, double factor)
      Description copied from interface: BinaryIO
      Read a star from the mapped buffer.
      Specified by:
      readParticleRecord in interface BinaryIO
      Parameters:
      mem - Mapped memory buffer to read from.
      factor - Scale factor to apply to the positions.
      Returns:
      The star.
    • readParticleRecord

      public ParticleRecord readParticleRecord(DataInputStream in, double factor) throws IOException
      Description copied from interface: BinaryIO
      Read a star from the input stream.
      Specified by:
      readParticleRecord in interface BinaryIO
      Parameters:
      in - Input stream.
      factor - Scale factor to apply to the positions.
      Returns:
      The star.
      Throws:
      IOException - If the read fails.