Class BinaryDataProvider

    • Constructor Detail

      • BinaryDataProvider

        public BinaryDataProvider()
    • Method Detail

      • loadData

        public java.util.List<ParticleGroup.ParticleBean> loadData​(java.lang.String file,
                                                                   double factor,
                                                                   boolean compatibility)
        Description copied from interface: IStarGroupDataProvider
        Loads the data applying a factor.
        Parameters:
        file - The file to load
        factor - Factor to apply to the positions
        compatibility - Use compatibility mode (DR1/DR2)
        Returns:
        Array of particle beans
      • loadData

        public java.util.List<ParticleGroup.ParticleBean> loadData​(java.io.InputStream is,
                                                                   double factor,
                                                                   boolean compatibility)
        Description copied from interface: IStarGroupDataProvider
        Loads the data applying a factor.
        Parameters:
        is - Input stream to load the data from
        factor - Factor to apply to the positions
        compatibility - Use compatibility mode (DR1/DR2)
        Returns:
        Array of particle beans
      • writeData

        public void writeData​(java.util.List<? extends ParticleGroup.ParticleBean> data,
                              java.io.OutputStream out,
                              boolean compat)
      • writeStarBean

        protected void writeStarBean​(StarGroup.StarBean sb,
                                     java.io.DataOutputStream out)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writeStarBean

        protected void writeStarBean​(StarGroup.StarBean sb,
                                     java.io.DataOutputStream out,
                                     boolean compat)
                              throws java.io.IOException
        Write the star bean to the output stream
        Parameters:
        sb - The star bean
        out - The output stream
        compat - Use compatibility with DR1/DR2 model (with tycho ids)
        Throws:
        java.io.IOException
      • readStarBean

        protected StarGroup.StarBean readStarBean​(java.io.DataInputStream in)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readStarBean

        protected StarGroup.StarBean readStarBean​(java.io.DataInputStream in,
                                                  boolean compat)
                                           throws java.io.IOException
        Read a star bean from input stream
        Parameters:
        in - Input stream
        compat - Use compatibility with DR1/DR2 model (with tycho ids)
        Returns:
        The star bean
        Throws:
        java.io.IOException
      • loadDataMapped

        public java.util.List<ParticleGroup.ParticleBean> loadDataMapped​(java.lang.String file,
                                                                         double factor,
                                                                         boolean compat)
        Description copied from interface: IStarGroupDataProvider
        Loads the data applying a factor using a memory mapped file for improved speed.
        Parameters:
        file - The file to load
        factor - Factor to apply to the positions
        compat - Use compatibility mode (DR1/DR2)
        Returns:
        Array of particle beans
      • readStarBean

        public StarGroup.StarBean readStarBean​(java.nio.MappedByteBuffer mem,
                                               double factor,
                                               boolean compat)