Package bref

Interface BrefWriter

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    AsIsBref3Writer, CompressBref3Writer

    public interface BrefWriter
    extends java.io.Closeable

    Interface BrefWrites writes phased, non-missing genotypes to a binary reference format (bref) file. The close() method must be called after the last invocation of the write() method in order to ensure that any buffered data are written to the output binary reference file.

    Instances of class BrefWriter are not thread-safe.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Flushes any buffered output and releases any system resources that are held by this BrefWriter.
      Samples samples()
      Returns the list of samples.
      void write​(RefGTRec rec)
      Writes the specified phased genotype data in binary reference format.
    • Method Detail

      • samples

        Samples samples()
        Returns the list of samples.
        Returns:
        the list of samples
      • write

        void write​(RefGTRec rec)
        Writes the specified phased genotype data in binary reference format. The Java virtual machine will exit with an error message if an I/O error occurs during method execution, if this.close() has previously been invoked, or if rec.samples().equals(this.samples()) == false.
        Parameters:
        rec - phased genotype data
        Throws:
        java.lang.NullPointerException - if rec == null
      • close

        void close()
        Flushes any buffered output and releases any system resources that are held by this BrefWriter. The Java virtual machine will exit with an error message if an I/O error occurs during method execution.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable