public class StreamDescriptor extends java.lang.Object implements Descriptor
Modifier and Type | Field and Description |
---|---|
protected boolean |
asciiTypes
stream uses just ascii format types.
|
protected java.nio.ByteOrder |
byteOrder |
Constructor and Description |
---|
StreamDescriptor(javax.xml.parsers.DocumentBuilderFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
addDescriptor(Descriptor pd)
add the descriptor to the stream, manually assigning it an id
|
void |
addDescriptor(Descriptor pd,
int descriptorId)
add the descriptor to the stream, with the given ID.
|
int |
descriptorId(Descriptor pd)
get the id for the descriptor.
|
java.nio.ByteOrder |
getByteOrder() |
org.w3c.dom.Element |
getDomElement() |
boolean |
hasDescriptor(Descriptor pd0,
int descriptorId)
If a second PacketDescriptor contains the same descriptor information, then the PacketDescriptor can be
dropped.
|
boolean |
isAsciiTypes() |
org.w3c.dom.Document |
newDocument(Descriptor descriptor)
get the XML document that will contain the descriptor.
|
void |
retireDescriptor(Descriptor pd)
indicate that no more packets will be sent with this descriptor.
|
void |
send(Descriptor pd,
java.nio.channels.WritableByteChannel out) |
void |
setAsciiTypes(boolean asciiTypes) |
void |
setByteOrder(java.nio.ByteOrder byteOrder) |
void |
setDomElement(org.w3c.dom.Element element) |
protected java.nio.ByteOrder byteOrder
protected boolean asciiTypes
public StreamDescriptor(javax.xml.parsers.DocumentBuilderFactory factory)
public void addDescriptor(Descriptor pd)
pd
- public boolean hasDescriptor(Descriptor pd0, int descriptorId)
pd0
- descriptorId
- public void addDescriptor(Descriptor pd, int descriptorId)
pd
- descriptorId
- public int descriptorId(Descriptor pd)
pd
- the packet descriptor.java.lang.IllegalArgumentException
- when the Descriptor is not found.public void retireDescriptor(Descriptor pd)
pd
- the descriptor.public void send(Descriptor pd, java.nio.channels.WritableByteChannel out) throws StreamException, java.io.IOException
StreamException
java.io.IOException
public org.w3c.dom.Document newDocument(Descriptor descriptor) throws javax.xml.parsers.ParserConfigurationException
descriptor
- the descriptorjavax.xml.parsers.ParserConfigurationException
public void setDomElement(org.w3c.dom.Element element)
public org.w3c.dom.Element getDomElement()
getDomElement
in interface Descriptor
public java.nio.ByteOrder getByteOrder()
public void setByteOrder(java.nio.ByteOrder byteOrder)
public boolean isAsciiTypes()
public void setAsciiTypes(boolean asciiTypes)