|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.uc3m.it.xbe32.XBE32Writer
This class allows XBE32 Elements to be serialized and written in an output
XBE32-encoded stream.
Please note that no data is actually written into the stream until the
serialize()
method is called.
For example, in order to encode the following data:
<service> <type> printer </type> <addr> 169.254.85.139 (0xA9FE558B) </addr> <ports> 515, 631 </ports> <options c="true" e="true"> <color ext="true" e="true" type="boolean"> false </color> <ppm ext="true" c="true" type="float32"> 20.5 </ppm> </options> </service>The following code could be used:
writer.openComplexElement(0x0001); writer.writeStringAttribute(0x2102, type); writer.writeOpaque4Attribute(0x2C03, addr.getAddress()); writer.writeInt16Attribute(0x2904, ports); writer.openComplexElement(0xC005); writer.writeExtBooleanAttribute(0x00000006, "color", false, true, false); writer.writeExtFloat32Attribute(0, "ppm", true, false, 20.5); writer.closeComplexElement(); writer.closeComplexElement(); writer.serialize();
That would generate the following XBE32-encoded stream (TLV view):
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 0 | service | LENGTH = 76 | 0001 004C +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 4 | type | Length = 11 | 2102 000B +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 8 | 'p' | 'r' | 'i' | 'n' | 7072 696E +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 12 | 't' | 'e' | 'r' | | 7465 7200 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 16 | addr | Length = 8 | 2C03 0008 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 20 | 0xA9FE558B | A9FE 558B +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 24 | ports | Length = 8 | 2904 0008 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 28 | 515 | 631 | 0203 0277 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 32 |C|E| options | LENGTH = 44 | C005 002C +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 36 | |E| <EXT ATTRIBUTE TLV> | LENGTH = 20 | 5F00 0014 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 40 | <Ext Id TLV> | Length = 8 | 2CFF 0008 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 44 | 0x00000006 | 0000 0006 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 48 | <Ext Boolean Value TLV> | Length = 5 | 2600 0005 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 52 | false | | 0000 0000 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 56 |C| <EXT ATTRIBUTE TLV> | LENGTH = 20 | 9F00 0014 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 60 | <Ext Name TLV> | Length = 7 | 21FF 0007 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 64 | 'p' | 'p' | 'm' | | 7070 6D00 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 68 | <Ext Float32 Value TLV> | Length = 8 | 2E00 0008 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 72 | 20.5 | 41A4 0000 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This writer may employ a XBE32Dictionary
in order to translate
the name of the XBE32 Element to be writen into a TLV Type/iddentifier.
Constructor Summary | |
XBE32Writer(OutputStream os)
Creates a new XBE32Writer to serialize XBE32 Elements into the specified OutputStream. |
Method Summary | |
void |
closeComplexElement()
Closes the last opened Complex Element. |
XBE32Dictionary |
getDictionary()
Returns the dictionary employed to translate XBE32 Elements' names into a TLV Type/identifier |
int |
getOpenElements()
Returns the number of Complex Elements that have been opened, but not closed yet |
void |
openComplexElement(boolean ext,
int id,
String name,
boolean c,
boolean e)
Writes a XBE32 Extensible or Compact Complex Element with the specified identifier/name and flags. |
void |
openComplexElement(int type)
Writes a XBE32 Compact Complex Element with the specified TLV Type. |
void |
openComplexElement(int id,
String name,
boolean c,
boolean e)
Writes a XBE32 Extensible Complex Element with the specified identifier/name and flags. |
int |
serialize()
This method is the one that actually writes the XBE32 Element defined before into the OutputStream |
void |
setDictionary(XBE32Dictionary dict)
Sets the dictionary to be employed to translate XBE32 Elements' names into a TLV Type/identifier |
void |
writeAttribute(boolean ext,
int id,
String name,
boolean c,
boolean e,
int type,
Object vals)
Writes an Compact or Extensible Attribute Element with the specified identifier/name, flags, and Values. |
void |
writeAttribute(int type,
Object val)
Writes a Compact Attribute Element with the specified TLV Type and Value. |
void |
writeBooleanAttribute(int type,
boolean val)
Writes a Compact Boolean Attribute Element with the specified TLV Type and a single Value. |
void |
writeBooleanAttribute(int type,
boolean[] vals)
Writes a Compact Boolean Attribute Element with the specified TLV Type and Value array. |
void |
writeExtAttribute(int id,
String name,
boolean c,
boolean e,
int type,
Object vals)
Writes an Extensible Attribute Element with the specified identifier/name and Values. |
void |
writeExtBooleanAttribute(int id,
String name,
boolean c,
boolean e,
boolean val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Boolean Value. |
void |
writeExtBooleanAttribute(int id,
String name,
boolean c,
boolean e,
boolean[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Boolean Values. |
void |
writeExtFloat32Attribute(int id,
String name,
boolean c,
boolean e,
float val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Float32 Value. |
void |
writeExtFloat32Attribute(int id,
String name,
boolean c,
boolean e,
float[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Float32 Values. |
void |
writeExtFloat64Attribute(int id,
String name,
boolean c,
boolean e,
double val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Float64 Value. |
void |
writeExtFloat64Attribute(int id,
String name,
boolean c,
boolean e,
double[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Float64 Values. |
void |
writeExtInt16Attribute(int id,
String name,
boolean c,
boolean e,
short val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Int16 Value. |
void |
writeExtInt16Attribute(int id,
String name,
boolean c,
boolean e,
short[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Int16 Values. |
void |
writeExtInt32Attribute(int id,
String name,
boolean c,
boolean e,
int val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Int32 Value. |
void |
writeExtInt32Attribute(int id,
String name,
boolean c,
boolean e,
int[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Int32 Values. |
void |
writeExtInt64Attribute(int id,
String name,
boolean c,
boolean e,
long val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Int64 Value. |
void |
writeExtInt64Attribute(int id,
String name,
boolean c,
boolean e,
long[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Int64 Values. |
void |
writeExtInt8Attribute(int id,
String name,
boolean c,
boolean e,
byte val)
Writes an Extensible Attribute Element with the specified identifier/name and a single int8 Value. |
void |
writeExtInt8Attribute(int id,
String name,
boolean c,
boolean e,
byte[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and int8 Values. |
void |
writeExtOpaque12Attribute(int id,
String name,
boolean c,
boolean e,
byte[] val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Opaque12 Value. |
void |
writeExtOpaque12Attribute(int id,
String name,
boolean c,
boolean e,
byte[][] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque12 Values. |
void |
writeExtOpaque16Attribute(int id,
String name,
boolean c,
boolean e,
byte[] val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Opaque16 Value. |
void |
writeExtOpaque16Attribute(int id,
String name,
boolean c,
boolean e,
byte[][] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque16 Values. |
void |
writeExtOpaque1Attribute(int id,
String name,
boolean c,
boolean e,
byte val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Opaque1 Value. |
void |
writeExtOpaque1Attribute(int id,
String name,
boolean c,
boolean e,
byte[] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque1 Values. |
void |
writeExtOpaque2Attribute(int id,
String name,
boolean c,
boolean e,
byte[] val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Opaque2 Value. |
void |
writeExtOpaque2Attribute(int id,
String name,
boolean c,
boolean e,
byte[][] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque2 Values. |
void |
writeExtOpaque4Attribute(int id,
String name,
boolean c,
boolean e,
byte[] val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Opaque4 Value. |
void |
writeExtOpaque4Attribute(int id,
String name,
boolean c,
boolean e,
byte[][] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque4 Values. |
void |
writeExtOpaque8Attribute(int id,
String name,
boolean c,
boolean e,
byte[] val)
Writes an Extensible Attribute Element with the specified identifier/name and a single Opaque8 Value. |
void |
writeExtOpaque8Attribute(int id,
String name,
boolean c,
boolean e,
byte[][] vals)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque8 Values. |
void |
writeExtOpaqueAttribute(int id,
String name,
boolean c,
boolean e,
byte[] val)
Writes an Extensible Attribute Element with the specified identifier/name and Opaque Value. |
void |
writeExtStringAttribute(int id,
String name,
boolean c,
boolean e,
String val)
Writes an Extensible Attribute Element with the specified identifier/name and String Value. |
void |
writeFloat32Attribute(int type,
float val)
Writes a Compact Float32 Attribute Element with the specified TLV Type and a single Value. |
void |
writeFloat32Attribute(int type,
float[] vals)
Writes a Compact Float32 Attribute Element with the specified TLV Type and Value array. |
void |
writeFloat64Attribute(int type,
double val)
Writes a Compact Float64 Attribute Element with the specified TLV Type and a single Value. |
void |
writeFloat64Attribute(int type,
double[] vals)
Writes a Compact Float64 Attribute Element with the specified TLV Type and Value array. |
void |
writeInt16Attribute(int type,
short val)
Writes a Compact Int16 Attribute Element with the specified TLV Type and a single Value. |
void |
writeInt16Attribute(int type,
short[] vals)
Writes a Compact Int16 Attribute Element with the specified TLV Type and Value array. |
void |
writeInt32Attribute(int type,
int val)
Writes a Compact Int32 Attribute Element with the specified TLV Type and a single Value. |
void |
writeInt32Attribute(int type,
int[] vals)
Writes a Compact Int32 Attribute Element with the specified TLV Type and Value array. |
void |
writeInt64Attribute(int type,
long val)
Writes a Compact Int64 Attribute Element with the specified TLV Type and a single Value. |
void |
writeInt64Attribute(int type,
long[] vals)
Writes a Compact Int64 Attribute Element with the specified TLV Type and Value array. |
void |
writeInt8Attribute(int type,
byte val)
Writes a Compact Int8 Attribute Element with the specified TLV Type and Value. |
void |
writeInt8Attribute(int type,
byte[] vals)
Writes a Compact Int8 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaque12Attribute(int type,
byte[] val)
Writes a Compact Opaque12 Attribute Element with the specified TLV Type and Value. |
void |
writeOpaque12Attribute(int type,
byte[][] vals)
Writes a Compact Opaque12 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaque16Attribute(int type,
byte[] val)
Writes a Compact Opaque16 Attribute Element with the specified TLV Type and Value. |
void |
writeOpaque16Attribute(int type,
byte[][] vals)
Writes a Compact Opaque16 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaque1Attribute(int type,
byte val)
Writes a Compact Opaque1 Attribute Element with the specified TLV Type and Value. |
void |
writeOpaque1Attribute(int type,
byte[] vals)
Writes a Compact Opaque1 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaque2Attribute(int type,
byte[] val)
Writes a Compact Opaque2 Attribute Element with the specified TLV Type and a single Value. |
void |
writeOpaque2Attribute(int type,
byte[][] vals)
Writes a Compact Opaque2 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaque4Attribute(int type,
byte[] val)
Writes a Compact Opaque4 Attribute Element with the specified TLV Type and a single Value. |
void |
writeOpaque4Attribute(int type,
byte[][] vals)
Writes a Compact Opaque4 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaque8Attribute(int type,
byte[] val)
Writes a Compact Opaque8 Attribute Element with the specified TLV Type and a single Value. |
void |
writeOpaque8Attribute(int type,
byte[][] vals)
Writes a Compact Opaque8 Attribute Element with the specified TLV Type and Value array. |
void |
writeOpaqueAttribute(int type,
byte[] val)
Writes a Compact Opaque Attribute Element with the specified TLV Type and a single Value. |
void |
writeStringAttribute(int type,
String val)
Writes a Compact String Attribute Element with the specified TLV Type and Value. |
void |
writeXBE32Element(XBE32Element elem)
Writes the specified XBE32 Element, including all their subelements if any. |
void |
writeXBE32Object(XBE32Writable obj)
Writes the specified Object employing its writeXBE32Element()
method.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XBE32Writer(OutputStream os)
os
- the stream to write TLVs atMethod Detail |
public XBE32Dictionary getDictionary()
public void setDictionary(XBE32Dictionary dict)
dict
- the new dictionarypublic int getOpenElements()
public void openComplexElement(int type) throws IllegalArgumentException
type
- the Complex Element identifier
IllegalArgumentException
- If the specified id is not a
Complex onecloseComplexElement()
,
serialize()
public void openComplexElement(int id, String name, boolean c, boolean e)
id
- the Complex Element identifier, or 0 if unknownname
- the Complex Element name, or null
if unknownc
- the Complex Element Continue flage
- the Complex Element Notify Error flagcloseComplexElement()
,
serialize()
public void openComplexElement(boolean ext, int id, String name, boolean c, boolean e)
ext
- whether the Complex Element is an Extensible or a Compact oneid
- the Complex Element identifier, or 0 if unknownname
- the Complex Element name, or null
if unknownc
- the Complex Element Continue flage
- the Complex Element Notify Error flagcloseComplexElement()
,
serialize()
public void closeComplexElement()
public void writeAttribute(int type, Object val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtAttribute(int id, String name, boolean c, boolean e, int type, Object vals)
Nothing will be written if values == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagtype
- the Type of Attribute Valuesvals
- the Attribute Element ValuesXBE32Element.OPAQUE_VALUE_TYPE
,
XBE32Element.STRING_VALUE_TYPE
,
XBE32Element.OPAQUE1_VALUES_TYPE
,
XBE32Element.INT8_VALUES_TYPE
,
XBE32Element.BOOLEAN_VALUES_TYPE
,
XBE32Element.OPAQUE2_VALUES_TYPE
,
XBE32Element.INT16_VALUES_TYPE
,
XBE32Element.OPAQUE4_VALUES_TYPE
,
XBE32Element.INT32_VALUES_TYPE
,
XBE32Element.FLOAT32_VALUES_TYPE
,
XBE32Element.OPAQUE8_VALUES_TYPE
,
XBE32Element.INT64_VALUES_TYPE
,
XBE32Element.FLOAT64_VALUES_TYPE
,
XBE32Element.OPAQUE12_VALUES_TYPE
,
XBE32Element.OPAQUE16_VALUES_TYPE
,
serialize()
public void writeAttribute(boolean ext, int id, String name, boolean c, boolean e, int type, Object vals)
Nothing will be written if vals == null
.
ext
- whether the Attribute is an Extensible or a Compact oneid
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagtype
- the Type of Attribute Valuesvals
- the Attribute Element ValuesXBE32Element.OPAQUE_VALUE_TYPE
,
XBE32Element.STRING_VALUE_TYPE
,
XBE32Element.OPAQUE1_VALUES_TYPE
,
XBE32Element.INT8_VALUES_TYPE
,
XBE32Element.BOOLEAN_VALUES_TYPE
,
XBE32Element.OPAQUE2_VALUES_TYPE
,
XBE32Element.INT16_VALUES_TYPE
,
XBE32Element.OPAQUE4_VALUES_TYPE
,
XBE32Element.INT32_VALUES_TYPE
,
XBE32Element.FLOAT32_VALUES_TYPE
,
XBE32Element.OPAQUE8_VALUES_TYPE
,
XBE32Element.INT64_VALUES_TYPE
,
XBE32Element.FLOAT64_VALUES_TYPE
,
XBE32Element.OPAQUE12_VALUES_TYPE
,
XBE32Element.OPAQUE16_VALUES_TYPE
,
serialize()
public void writeOpaqueAttribute(int type, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaqueAttribute(int id, String name, boolean c, boolean e, byte[] val)
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeStringAttribute(int type, String val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one, or it does not match with the specified Valueserialize()
,
XBE32Element
public void writeExtStringAttribute(int id, String name, boolean c, boolean e, String val)
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeOpaque1Attribute(int type, byte val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeOpaque1Attribute(int type, byte[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaque1Attribute(int id, String name, boolean c, boolean e, byte val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtOpaque1Attribute(int id, String name, boolean c, boolean e, byte[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeInt8Attribute(int type, byte val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeInt8Attribute(int type, byte[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtInt8Attribute(int id, String name, boolean c, boolean e, byte val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtInt8Attribute(int id, String name, boolean c, boolean e, byte[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeBooleanAttribute(int type, boolean val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeBooleanAttribute(int type, boolean[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtBooleanAttribute(int id, String name, boolean c, boolean e, boolean val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtBooleanAttribute(int id, String name, boolean c, boolean e, boolean[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeOpaque2Attribute(int type, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeOpaque2Attribute(int type, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaque2Attribute(int id, String name, boolean c, boolean e, byte[] val)
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtOpaque2Attribute(int id, String name, boolean c, boolean e, byte[][] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeInt16Attribute(int type, short val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeInt16Attribute(int type, short[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtInt16Attribute(int id, String name, boolean c, boolean e, short val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtInt16Attribute(int id, String name, boolean c, boolean e, short[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeOpaque4Attribute(int type, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeOpaque4Attribute(int type, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaque4Attribute(int id, String name, boolean c, boolean e, byte[] val)
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtOpaque4Attribute(int id, String name, boolean c, boolean e, byte[][] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeInt32Attribute(int type, int val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeInt32Attribute(int type, int[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtInt32Attribute(int id, String name, boolean c, boolean e, int val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtInt32Attribute(int id, String name, boolean c, boolean e, int[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeFloat32Attribute(int type, float val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeFloat32Attribute(int type, float[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtFloat32Attribute(int id, String name, boolean c, boolean e, float val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtFloat32Attribute(int id, String name, boolean c, boolean e, float[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeOpaque8Attribute(int type, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeOpaque8Attribute(int type, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaque8Attribute(int id, String name, boolean c, boolean e, byte[] val)
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtOpaque8Attribute(int id, String name, boolean c, boolean e, byte[][] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeInt64Attribute(int type, long val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeInt64Attribute(int type, long[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtInt64Attribute(int id, String name, boolean c, boolean e, long val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtInt64Attribute(int id, String name, boolean c, boolean e, long[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeFloat64Attribute(int type, double val) throws IllegalArgumentException
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeFloat64Attribute(int type, double[] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtFloat64Attribute(int id, String name, boolean c, boolean e, double val)
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Valueserialize()
public void writeExtFloat64Attribute(int id, String name, boolean c, boolean e, double[] vals)
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Valuesserialize()
public void writeOpaque12Attribute(int type, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeOpaque12Attribute(int type, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaque12Attribute(int id, String name, boolean c, boolean e, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Value
IllegalArgumentException
- if the Value is not 12 bytes longserialize()
public void writeExtOpaque12Attribute(int id, String name, boolean c, boolean e, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Values
IllegalArgumentException
- if the Values are not 12 bytes longserialize()
public void writeOpaque16Attribute(int type, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
type
- the Attribute Element identifierval
- the Attribute Element Value
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeOpaque16Attribute(int type, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
type
- the Attribute Element identifiervals
- the Attribute Element Values
IllegalArgumentException
- If the specified Type value is not a
Simple one or it does not match with the specified Valueserialize()
,
TLV
public void writeExtOpaque16Attribute(int id, String name, boolean c, boolean e, byte[] val) throws IllegalArgumentException
Nothing will be written if val == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagval
- the Attribute Element Value
IllegalArgumentException
- if the Value is not 16 bytes longserialize()
public void writeExtOpaque16Attribute(int id, String name, boolean c, boolean e, byte[][] vals) throws IllegalArgumentException
Nothing will be written if vals == null
.
id
- the Attribute Element identifiername
- the Attribute Element namec
- the Attribute Element Continue flage
- the Attribute Element Notify Error flagvals
- the Attribute Element Values
IllegalArgumentException
- if the Values are not 16 bytes longserialize()
public void writeXBE32Element(XBE32Element elem)
Nothing will be written if elem == null
.
elem
- the XBE32 Element to be writtenserialize()
public void writeXBE32Object(XBE32Writable obj)
writeXBE32Element()
method.
Nothing will be written if obj == null
.
obj
- the Object to be writtenserialize()
public int serialize() throws IOException
IOException
- when an error occurs writing the underlying stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |