public class HapiTableReader extends Object
Constructor and Description |
---|
HapiTableReader(HapiParam[] params)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
RowSequence |
createRowSequence(InputStream in,
Byte byte0,
String fmt)
Returns a row sequence given a HAPI data stream with no header.
|
RowSequence |
createRowSequenceUsingHeader(InputStream in)
Returns a row sequence given a HAPI data stream including the
prepended commented header (info JSON object) information.
|
StarTable |
createStarTable(IOSupplier<RowSequence> rseqSupplier)
Produces a StarTable based on this metadata given a source of
row sequence data.
|
public HapiTableReader(HapiParam[] params)
params
- array of parameters that will be readpublic StarTable createStarTable(IOSupplier<RowSequence> rseqSupplier)
If a null RowSequence supplier is provided, the resulting table will be data-less; its metadata methods will work, but attempts to read its data will fail.
rseqSupplier
- provides sequential data for the table, or nullpublic RowSequence createRowSequenceUsingHeader(InputStream in) throws IOException
The supplied input stream will be used as is, so any buffering should be applied before calling this method.
in
- input stream including prepended HAPI headerIOException
public RowSequence createRowSequence(InputStream in, Byte byte0, String fmt) throws IOException
The supplied input stream will be used as is, so any buffering should be applied before calling this method.
in
- input stream ready for usebyte0
- byte to read at start of input sequence, or nullfmt
- data stream format, one of "csv" or "binary"IOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.