Class BitsFileWriterImpl

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, BitsFileWriter

    public class BitsFileWriterImpl
    extends java.lang.Object
    implements BitsFileWriter
    • Constructor Summary

      Constructors 
      Constructor Description
      BitsFileWriterImpl​(org.apache.hugegraph.computer.core.config.Config config, java.io.File dir)  
      BitsFileWriterImpl​(org.apache.hugegraph.computer.core.config.Config config, java.lang.String dir)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void flush()
      Write 1 long to buffer when invoke writeBoolean 64 times.
      void writeBoolean​(boolean value)
      Write 1 boolean to file, file is a directory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitsFileWriterImpl

        public BitsFileWriterImpl​(org.apache.hugegraph.computer.core.config.Config config,
                                  java.lang.String dir)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • BitsFileWriterImpl

        public BitsFileWriterImpl​(org.apache.hugegraph.computer.core.config.Config config,
                                  java.io.File dir)
                           throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • writeBoolean

        public void writeBoolean​(boolean value)
                          throws java.io.IOException
        Description copied from interface: BitsFileWriter
        Write 1 boolean to file, file is a directory. Use 1 long store 64 booleans, write from low to high.
        Specified by:
        writeBoolean in interface BitsFileWriter
        Parameters:
        value - boolean data
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Description copied from interface: BitsFileWriter
        Write 1 long to buffer when invoke writeBoolean 64 times. This method will write the buffer to the file, but the part of written not enough 64 times will not be written to the file.
        Specified by:
        flush in interface BitsFileWriter
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface BitsFileWriter
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException