R
- record type.public abstract class BinaryTableWriter<R>
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
protected java.io.DataOutputStream |
dataOut |
Modifier | Constructor and Description |
---|---|
protected |
BinaryTableWriter(java.io.OutputStream out,
java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
java.lang.String |
getPath() |
long |
numberOfRecords() |
long |
offset() |
void |
write(R record) |
void |
writeAll(java.lang.Iterable<? extends R> records) |
protected abstract void |
writeRecord(R record,
java.io.DataOutput output) |
protected BinaryTableWriter(java.io.OutputStream out, java.lang.String path)
public long offset()
public java.lang.String getPath()
protected abstract void writeRecord(R record, java.io.DataOutput output) throws java.io.IOException
java.io.IOException
public void write(R record) throws java.io.IOException
java.io.IOException
public void writeAll(java.lang.Iterable<? extends R> records) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public long numberOfRecords()