public class ColumnFileWriter extends Object
writeTo(File)
is called.Constructor and Description |
---|
ColumnFileWriter(ColumnFileMetaData fileMeta,
ColumnMetaData... columnMeta)
Construct given metadata for each column in the file.
|
Modifier and Type | Method and Description |
---|---|
void |
endRow()
Expert: Called after all values are written to a row.
|
int |
getColumnCount()
Return the number of columns in the file.
|
ColumnFileMetaData |
getMetaData()
Return this file's metadata.
|
long |
sizeEstimate()
Return the approximate size of the file that will be written.
|
void |
startRow()
Expert: Called before any values are written to a row.
|
void |
writeLength(int length,
int column)
Expert: Declare a count of items to be written to an array column or a
column whose parent is an array.
|
void |
writeRow(Object... row)
Add a row to the file.
|
void |
writeTo(File file)
Write all rows added to the named file.
|
void |
writeTo(OutputStream out)
Write all rows added to the named output stream.
|
void |
writeValue(Object value,
int column)
Expert: Add a value to a row.
|
public ColumnFileWriter(ColumnFileMetaData fileMeta, ColumnMetaData... columnMeta) throws IOException
IOException
public long sizeEstimate()
writeTo(OutputStream)
.public ColumnFileMetaData getMetaData()
public int getColumnCount()
public void writeRow(Object... row) throws IOException
IOException
public void startRow() throws IOException
IOException
public void writeLength(int length, int column) throws IOException
IOException
public void writeValue(Object value, int column) throws IOException
writeLength(int, int)
and must be called that many times. For normal
columns this is called once for each row in the column.IOException
public void endRow() throws IOException
IOException
public void writeTo(File file) throws IOException
IOException
public void writeTo(OutputStream out) throws IOException
IOException
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.