Class BitsFileWriterImpl
- java.lang.Object
-
- org.apache.hugegraph.computer.core.store.file.seqfile.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 voidclose()voidflush()Write 1 long to buffer when invoke writeBoolean 64 times.voidwriteBoolean(boolean value)Write 1 boolean to file, file is a directory.
-
-
-
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.IOExceptionDescription copied from interface:BitsFileWriterWrite 1 boolean to file, file is a directory. Use 1 long store 64 booleans, write from low to high.- Specified by:
writeBooleanin interfaceBitsFileWriter- Parameters:
value- boolean data- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOExceptionDescription copied from interface:BitsFileWriterWrite 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:
flushin interfaceBitsFileWriter- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceBitsFileWriter- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-