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
StreamHandlerstreamDescriptor in interface StreamHandlerStreamExceptionpublic void packetDescriptor(PacketDescriptor pd) throws StreamException
StreamHandlerpacketDescriptor in interface StreamHandlerStreamExceptionpublic void packet(PacketDescriptor pd, java.nio.ByteBuffer data) throws StreamException
StreamHandlerpacket in interface StreamHandlerpd - 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
StreamHandlerstreamClosed in interface StreamHandlerStreamExceptionpublic void streamException(StreamException se) throws StreamException
StreamHandlerstreamException in interface StreamHandlerStreamExceptionpublic void streamComment(StreamComment se) throws StreamException
StreamHandlerstreamComment in interface StreamHandlerStreamException