org.das2.qstream.StreamTool

Code for reading streams. This sends packets to a StreamHandler.

StreamTool( )

Creates a new instance of StreamTool


advanceTo

advanceTo( java.io.InputStream in, byte[] delim ) → byte[]

Parameters

in - an InputStream
delim - a byte[]

Returns:

byte[]

[search for examples] [view on GitHub] [view on old javadoc] [view source]


formatHeader

formatHeader( org.w3c.dom.Document document, java.io.Writer writer ) → void

Parameters

document - a Document
writer - a Writer

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


readStream

readStream( java.nio.channels.ReadableByteChannel stream, org.das2.qstream.StreamHandler handler ) → void

Parameters

stream - a ReadableByteChannel
handler - a StreamHandler

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


readXML

readXML( java.io.PushbackInputStream in ) → byte[]

Read off XML data from the InputStream up to the termination of the XML. XML data is returned in a byte array. The InputStream is left just following the XML terminator. Processing is done with as little interpretation as possible, so invalid XML will cause problems with little feedback about what's wrong.

Parameters

in - a PushbackInputStream

Returns:

byte[]

[search for examples] [view on GitHub] [view on old javadoc] [view source]

readXML( java.nio.ByteBuffer input ) → java.nio.ByteBuffer