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
IOExceptionpublic long sizeEstimate()
writeTo(OutputStream).public ColumnFileMetaData getMetaData()
public int getColumnCount()
public void writeRow(Object... row) throws IOException
IOExceptionpublic void startRow()
throws IOException
IOExceptionpublic void writeLength(int length,
int column)
throws IOException
IOExceptionpublic 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.IOExceptionpublic void endRow()
throws IOException
IOExceptionpublic void writeTo(File file) throws IOException
IOExceptionpublic void writeTo(OutputStream out) throws IOException
IOExceptionCopyright © 2009–2023 The Apache Software Foundation. All rights reserved.