Class BinaryIOBase

  • All Implemented Interfaces:
    BinaryIO
    Direct Known Subclasses:
    BinaryVersion0, BinaryVersion2

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

      Fields 
      Modifier and Type Field Description
      protected int nDoubles  
      protected int nFloats  
      protected boolean tychoIds  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BinaryIOBase​(int nDoubles, int nFloats, boolean tychoIds)  
    • Field Detail

      • nDoubles

        protected final int nDoubles
      • nFloats

        protected final int nFloats
      • tychoIds

        protected boolean tychoIds
    • Constructor Detail

      • BinaryIOBase

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

      • readParticleRecord

        public ParticleRecord readParticleRecord​(java.nio.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 positions
        Returns:
        The star
      • readParticleRecord

        public ParticleRecord readParticleRecord​(java.io.DataInputStream in,
                                                 double factor)
                                          throws java.io.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 positions
        Returns:
        The star
        Throws:
        java.io.IOException