public class EcsvHeader extends Object
| Constructor and Description |
|---|
EcsvHeader(String[] yamlLines,
String namesLine)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getNamesLine()
Returns the CSV-formatted line supposed to contain column names.
|
String[] |
getYamlLines()
Returns the lines of YAML containing header information.
|
static boolean |
isMagic(byte[] intro)
Indicates whether a byte sequence indicates the start of an ECSV file.
|
static EcsvHeader |
readHeader(LineReader rdr)
Constructs an EcsvHeader instance by reading lines from a file.
|
public EcsvHeader(String[] yamlLines, String namesLine)
yamlLines - lines of YAML containing header information;
these lines exclude the leading "# " characters
found in the ECSV filenamesLine - first non-YAML line in the ECSV file,
which is supposed to contain a redundant list
of column namespublic String[] getYamlLines()
public String getNamesLine()
public static EcsvHeader readHeader(LineReader rdr) throws IOException, EcsvFormatException
rdr - line reader returning input linesIOExceptionEcsvFormatExceptionpublic static boolean isMagic(byte[] intro)
intro - first few bytes of a fileCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.