public abstract class VariableStarColumnWriter extends StarColumnWriter
Modifier and Type | Class and Description |
---|---|
static class |
VariableStarColumnWriter.PointerSize
Enumeration for pointer size.
|
StarColumnWriter.DataStat
Modifier | Constructor and Description |
---|---|
protected |
VariableStarColumnWriter(StarTable table,
int icol,
uk.ac.bristol.star.feather.FeatherType ftype,
boolean isNullable,
VariableStarColumnWriter.PointerSize psize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static VariableStarColumnWriter |
createByteArrayWriter(StarTable table,
int icol,
boolean isNullable,
VariableStarColumnWriter.PointerSize psize)
Returns a column writer for variable-length byte array values.
|
ItemAccumulator |
createItemAccumulator(StoragePolicy storage) |
static VariableStarColumnWriter |
createStringWriter(StarTable table,
int icol,
boolean isNullable,
VariableStarColumnWriter.PointerSize psize)
Returns a column writer for variable-length string values.
|
abstract int |
getItemSize(java.lang.Object item)
Returns the number of bytes that a given item will occupy in
the output stream.
|
StarColumnWriter.DataStat |
writeDataBytes(java.io.OutputStream out)
Writes the bytes consituting the data stream for this column,
excluding any optional validity mask.
|
abstract int |
writeItemBytes(java.io.OutputStream out,
java.lang.Object item)
Writes a value to the output stream.
|
getColumnIndex, getFeatherType, getName, getTable, getUserMetadata, isNullable, writeColumnBytes
protected VariableStarColumnWriter(StarTable table, int icol, uk.ac.bristol.star.feather.FeatherType ftype, boolean isNullable, VariableStarColumnWriter.PointerSize psize)
table
- input tableicol
- column indexftype
- output data typeisNullable
- if true, nulls will be marked as invalid;
if false, they will just be represented
as zero lengthpsize
- pointer sizepublic abstract int getItemSize(java.lang.Object item)
item
- writable valuepublic abstract int writeItemBytes(java.io.OutputStream out, java.lang.Object item) throws java.io.IOException
getItemSize(java.lang.Object)
.out
- destination streamitem
- writable valuejava.io.IOException
public StarColumnWriter.DataStat writeDataBytes(java.io.OutputStream out) throws java.io.IOException
StarColumnWriter
writeDataBytes
in class StarColumnWriter
out
- destination streamjava.io.IOException
public ItemAccumulator createItemAccumulator(StoragePolicy storage)
createItemAccumulator
in class StarColumnWriter
public static VariableStarColumnWriter createStringWriter(StarTable table, int icol, boolean isNullable, VariableStarColumnWriter.PointerSize psize)
table
- input tableicol
- column indexisNullable
- if true, nulls will be marked as invalid;
if false, they will just be represented
as zero length stringspsize
- pointer sizepublic static VariableStarColumnWriter createByteArrayWriter(StarTable table, int icol, boolean isNullable, VariableStarColumnWriter.PointerSize psize)
table
- input tableicol
- column indexisNullable
- if true, nulls will be marked as invalid;
if false, they will just be represented
as zero length arrayspsize
- pointer size