public class FormatStreamHandler extends java.lang.Object implements StreamHandler
Constructor and Description |
---|
FormatStreamHandler() |
Modifier and Type | Method and Description |
---|---|
StreamDescriptor |
createStreamDescriptor(java.lang.String name,
boolean asciiTypes,
boolean isBigEndian)
create a stream descriptor packet.
|
void |
packet(PacketDescriptor pd,
java.nio.ByteBuffer data)
receive a data packet from the stream.
|
void |
packetDescriptor(PacketDescriptor pd)
description of a new packet type.
|
void |
setOutputStream(java.io.OutputStream outs) |
void |
setWritableByteChannel(java.nio.channels.WritableByteChannel outs) |
void |
streamClosed(StreamDescriptor sd)
indicates the stream end is encountered.
|
void |
streamComment(StreamComment se)
comments on the stream.
|
void |
streamDescriptor(StreamDescriptor sd)
initial description of the stream.
|
void |
streamException(StreamException se)
This is used to indicate an exception occurred in the source.
|
public void setOutputStream(java.io.OutputStream outs)
public void setWritableByteChannel(java.nio.channels.WritableByteChannel outs)
public StreamDescriptor createStreamDescriptor(java.lang.String name, boolean asciiTypes, boolean isBigEndian)
name
- asciiTypes
- isBigEndian
- public void streamDescriptor(StreamDescriptor sd) throws StreamException
StreamHandler
streamDescriptor
in interface StreamHandler
StreamException
public void packetDescriptor(PacketDescriptor pd) throws StreamException
StreamHandler
packetDescriptor
in interface StreamHandler
StreamException
public void packet(PacketDescriptor pd, java.nio.ByteBuffer data) throws StreamException
StreamHandler
packet
in interface StreamHandler
pd
- PacketDescriptor describing the data.data
- ByteBuffer containing the data.StreamException
- when something is wrong with the content of the stream.public void streamClosed(StreamDescriptor sd) throws StreamException
StreamHandler
streamClosed
in interface StreamHandler
StreamException
public void streamException(StreamException se) throws StreamException
StreamHandler
streamException
in interface StreamHandler
StreamException
public void streamComment(StreamComment se) throws StreamException
StreamHandler
streamComment
in interface StreamHandler
StreamException