org.das2.qstream.SerialStreamFormatter
We need a class that can format a stream serially. SimpleStreamFormatter needs the whole dataset, which really
misses the point with QStreams, that you can process and create data streams serially on the server side. The
das2stream codes were first coded with this use case, but QStreams were not and because of this a good serial
generator was never created.
See the main method for an example of how this is used.
Note this class is not thread-safe and assumes that only one thread will be working on the stream. This may change.
SerialStreamFormatter( )
DEFAULT_TIME_DIGITS
INOUTFORM_INLINE
INOUTFORM_ONE_RECORD
INOUTFORM_STREAMING
format
format( String joinName, String name, QDataSet ds1, String inoutForm ) → void
format the dataset, maybe sending a descriptor if it hasn't been sent already.
Parameters
joinName - the name to which we join the dataset.
name - the name for the dataset of which ds1 is all or a slice of, or null.
ds1 - a QDataSet
inoutForm - one of "inline", "oneRecord", or "streaming"
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
format( String name, QDataSet ds1, String inoutForm ) → void
init
init( String name, java.nio.channels.WritableByteChannel out ) → void
the name of the default dataset.
Parameters
name - a String
out - a WritableByteChannel
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
init( String name, org.das2.qstream.StreamHandler sh ) → void
isAsciiTypes
isAsciiTypes( ) → boolean
Returns:
boolean
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isBigEndian
isBigEndian( ) → boolean
Returns:
boolean
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
join
join( String name, int rank, java.util.Map props ) → void
Parameters
name - a String
rank - an int
props - a java.util.Map
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
main
main( String[] args ) → void
Parameters
args - a java.lang.String[]
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
maybeFormat
maybeFormat( String name, QDataSet ds1, String inoutForm ) → void
format the dataset, maybe sending a descriptor if it hasn't been sent already.
ds1 may be null in this function, in which case nothing needs to be done.
Parameters
name - the name for the dataset of which ds1 is all or a slice of, or null.
ds1 - a QDataSet
inoutForm - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
retire
retire( String name ) → void
allow the stream to recycle the name. new packets with this name will issue a new packetDescriptor.
Parameters
name - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setAsciiTypes
setAsciiTypes( boolean asciiTypes ) → void
Parameters
asciiTypes - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setBigEndian
setBigEndian( boolean bigEndian ) → void
Parameters
bigEndian - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setTransferType
setTransferType( String name, org.das2.qstream.TransferType tt ) → void
explicitly set the transfer type.
Parameters
name - a String
tt - a TransferType
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setUnitTransferType
setUnitTransferType( Units u, org.das2.qstream.TransferType tt ) → void
explicitly set the transfer type used to transfer data that is convertible to this
unit.
Parameters
u - an Units
tt - a TransferType
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]