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(Object item)
Returns the number of bytes that a given item will occupy in
the output stream.
|
StarColumnWriter.DataStat |
writeDataBytes(OutputStream out)
Writes the bytes consituting the data stream for this column,
excluding any optional validity mask.
|
abstract int |
writeItemBytes(OutputStream out,
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(Object item)
item
- writable valuepublic abstract int writeItemBytes(OutputStream out, Object item) throws IOException
getItemSize(java.lang.Object)
.out
- destination streamitem
- writable valueIOException
public StarColumnWriter.DataStat writeDataBytes(OutputStream out) throws IOException
StarColumnWriter
writeDataBytes
in class StarColumnWriter
out
- destination streamIOException
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 sizeCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.