public class QdsToD2sStream
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAUT_FRAC_SEC |
static int |
DEFAUT_SIG_DIGIT |
static java.lang.String |
FORMAT_2_2 |
static java.lang.String |
FORMAT_2_3_BASIC |
static java.lang.String |
FORMAT_2_3_GENERAL |
static java.lang.String[] |
formats |
| Constructor and Description |
|---|
QdsToD2sStream(java.lang.String version)
Initialize a binary QDataSet to das2 stream exporter
|
QdsToD2sStream(java.lang.String version,
int genSigDigits,
int fracSecDigits)
Initialize a text QDataSet to das2 stream exporter
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite(QDataSet qds)
Determine if a given dataset be serialized as a das2 stream
|
protected boolean |
canWriteNonJoin(QDataSet qds) |
static java.lang.String |
qd2DataAxis(QDataSet qds)
Determine the name of the das2 axis on which values from a dataset
would typically be plotted.
|
boolean |
write(QDataSet qds,
java.io.OutputStream os)
Write a QDataSet as a das2 stream
To test whether it looks like this code could stream a dataset use the
canWrite() function.
|
public static final java.lang.String FORMAT_2_2
public static final java.lang.String FORMAT_2_3_BASIC
public static final java.lang.String FORMAT_2_3_GENERAL
public static final java.lang.String[] formats
public static final int DEFAUT_FRAC_SEC
public static final int DEFAUT_SIG_DIGIT
public QdsToD2sStream(java.lang.String version)
version - The output version to write, valid choices are defined
in the static formats arraypublic QdsToD2sStream(java.lang.String version,
int genSigDigits,
int fracSecDigits)
version - The output version to write, valid choices are defined
in the static formats arraygenSigDigits - The number of significant digits used for general
text value data output. If you don't know what else to use, 5 is
typically a fine precision without being ridiculous.fracSecDigits - The number of fractional seconds digits to
use for ISO-8601 date-time values. The number of fraction seconds
can be set as low as 0 and as high as 12 (picoseconds). If
successive time values vary by less than the specified precision
(but not 0, repeats are accepted) then stream writing fails. Use 3 (i.e.
microseconds) if you don't know what else to choose.public boolean canWrite(QDataSet qds)
qds - The dataset to writepublic boolean write(QDataSet qds, java.io.OutputStream os) throws java.io.IOException
qds - The dataset to write, may have join's bundles etc. but no
rank 3 or higher component datasets.os - an open output stream, which is not closed by this code.java.io.IOExceptionprotected boolean canWriteNonJoin(QDataSet qds)
public static java.lang.String qd2DataAxis(QDataSet qds)
qds -