1 /**
2 * Java docs licensed under the Apache License, Version 2.0
3 * http://www.apache.org/licenses/LICENSE-2.0
4 * (c) Copyright 2001, 2002 Motorola, Inc. ALL RIGHTS RESERVED.
5 *
6 *
7 * @version $Id: DataElement.java 1379 2007-10-13 02:00:43Z vlads $
8 */
9
10 package javax.bluetooth;
11
12 import java.util.Vector;
13
14 /**
15 * The <code>DataElement</code> class defines the various data
16 * types that a Bluetooth service attribute value may have.
17 *
18 * The following table describes the data types and valid
19 * values that a <code>DataElement</code> object can store.
20 *
21 * <TABLE BORDER>
22 * <TR><TH>Data Type</TH><TH>Valid Values</TH></TR>
23 * <TR><TD><code>NULL</code></TD><TD>represents a
24 * <code>null</code> value
25 * </TD></TR> <TR><TD><code>U_INT_1</code></TD><TD><code>
26 * long </code> value range [0, 255]</TD></TR>
27 * <TR><TD><code>U_INT_2</code></TD><TD><code>long</code>
28 * value range [0, 2<sup>16</sup>-1]</TD></TR>
29 * <TR><TD><code>U_INT_4</code></TD>
30 * <TD><code>long</code> value range [0, 2<sup>32</sup>-1]</TD></TR>
31 * <TR><TD><code>U_INT_8</code></TD>
32 * <TD><code>byte[]</code> value range [0, 2<sup>64</sup>-1]</TD></TR>
33 * <TR><TD><code>U_INT_16</code></TD>
34 * <TD><code>byte[]</code> value range [0, 2<sup>128</sup>-1]</TD></TR>
35 * <TR><TD><code>INT_1</code></TD><TD><code>long</code>
36 * value range [-128, 127]</TD></TR>
37 * <TR><TD><code>INT_2</code></TD><TD><code>long</code>
38 * value range [-2<sup>15</sup>, 2<sup>15</sup>-1]</TD></TR>
39 * <TR><TD><code>INT_4</code></TD><TD><code>long</code>
40 * value range [-2<sup>31</sup>, 2<sup>31</sup>-1]</TD></TR>
41 * <TR><TD><code>INT_8</code></TD><TD><code>long</code>
42 * value range [-2<sup>63</sup>, 2<sup>63</sup>-1]</TD></TR>
43 * <TR><TD><code>INT_16</code></TD><TD><code>byte[]</code>
44 * value range [-2<sup>127</sup>, 2<sup>127</sup>-1]</TD></TR>
45 * <TR><TD><code>URL</code></TD>
46 * <TD><code>java.lang.String</code></TD></TR>
47 * <TR><TD><code>UUID</code></TD>
48 * <TD><code>javax.bluetooth.UUID</code></TD></TR>
49 * <TR><TD><code>BOOL</code></TD><TD><code>boolean</code></TD></TR>
50 * <TR><TD><code>STRING</code></TD>
51 * <TD><code>java.lang.String</code></TD></TR>
52 * <TR><TD><code>DATSEQ</code></TD>
53 * <TD><code>java.util.Enumeration</code></TD></TR>
54 * <TR><TD><code>DATALT</code></TD>
55 * <TD><code>java.util.Enumeration</code></TD></TR>
56 * </TABLE>
57 *
58 * @version 1.0 February 11, 2002
59 *
60 */
61
62 public class DataElement {
63
64
65
66
67 /*
68 * The following section defines public, static and instance
69 * member variables used in the implementation of the methods.
70 */
71
72
73
74 /**
75 * Defines data of type NULL.
76 *
77 * The value for data type <code>DataElement.NULL</code> is
78 * implicit, i.e., there is no representation of it.
79 * Accordingly there is no method to retrieve
80 * it, and attempts to retrieve the value will throw an exception.
81 * <P>
82 * The value of <code>NULL</code> is 0x00 (0).
83 *
84 */
85 public static final int NULL = 0x0000;
86
87 /**
88 * Defines an unsigned integer of size one byte.
89 * <P>
90 * The value of the constant <code>U_INT_1</code>
91 * is 0x08 (8).
92 */
93 public static final int U_INT_1 = 0x0008;
94
95 /**
96 * Defines an unsigned integer of size two bytes.
97 * <P>
98 * The value of the constant <code>U_INT_2</code> is 0x09 (9).
99 */
100 public static final int U_INT_2 = 0x0009;
101
102 /**
103 * Defines an unsigned integer of size four bytes.
104 * <P>
105 * The value of the constant <code>U_INT_4</code> is 0x0A (10).
106 */
107 public static final int U_INT_4 = 0x000A;
108
109 /**
110 * Defines an unsigned integer of size eight bytes.
111 * <P>
112 * The value of the constant <code>U_INT_8</code> is 0x0B (11).
113 */
114 public static final int U_INT_8 = 0x000B;
115
116 /**
117 * Defines an unsigned integer of size sixteen bytes.
118 * <P>
119 * The value of the constant <code>U_INT_16</code> is 0x0C (12).
120 */
121 public static final int U_INT_16 = 0x000C;
122
123 /**
124 * Defines a signed integer of size one byte.
125 * <P>
126 * The value of the constant <code>INT_1</code> is 0x10 (16).
127 */
128 public static final int INT_1 = 0x0010;
129
130 /**
131 * Defines a signed integer of size two bytes.
132 * <P>
133 * The value of the constant <code>INT_2</code> is 0x11 (17).
134 */
135 public static final int INT_2 = 0x0011;
136
137 /**
138 * Defines a signed integer of size four bytes.
139 * <P>
140 * The value of the constant <code>INT_4</code> is 0x12 (18).
141 */
142 public static final int INT_4 = 0x0012;
143
144 /**
145 * Defines a signed integer of size eight bytes.
146 * <P>
147 * The value of the constant <code>INT_8</code> is 0x13 (19).
148 */
149 public static final int INT_8 = 0x0013;
150
151 /**
152 * Defines a signed integer of size sixteen bytes.
153 * <P>
154 * The value of the constant <code>INT_16</code> is 0x14 (20).
155 */
156 public static final int INT_16 = 0x0014;
157
158 /**
159 * Defines data of type URL.
160 * <P>
161 * The value of the constant <code>URL</code> is 0x40 (64).
162 */
163 public static final int URL = 0x0040;
164
165 /**
166 * Defines data of type UUID.
167 * <P>
168 * The value of the constant <code>UUID</code> is 0x18 (24).
169 */
170 public static final int UUID = 0x0018;
171
172 /**
173 * Defines data of type BOOL.
174 * <P>
175 * The value of the constant <code>BOOL</code> is 0x28 (40).
176 */
177 public static final int BOOL = 0x0028;
178
179 /**
180 * Defines data of type STRING.
181 * <P>
182 * The value of the constant <code>STRING</code> is 0x20 (32).
183 */
184 public static final int STRING = 0x0020;
185
186 /**
187 * Defines data of type DATSEQ. The service attribute value whose
188 * data has this type must consider all the elements of the list,
189 * i.e. the value is the whole set and not a subset. The elements
190 * of the set can be of any type defined in this class, including
191 * DATSEQ.
192 * <P>
193 * The value of the constant <code>DATSEQ</code> is 0x30 (48).
194 */
195 public static final int DATSEQ = 0x0030;
196
197 /**
198 * Defines data of type DATALT. The service attribute value whose
199 * data has this type must consider only one of the elements of the
200 * set, i.e., the value is the not the whole set but only one
201 * element of the set. The user is free to choose any one element.
202 * The elements of the set can be of any type defined in this class,
203 * including DATALT.
204 * <P>
205 * The value of the constant <code>DATALT</code> is 0x38 (56).
206 */
207 public static final int DATALT = 0x0038;
208
209 private Object value;
210
211 private int valueType;
212
213 /**
214 * Creates a <code>DataElement</code> of type <code>NULL</code>,
215 * <code>DATALT</code>, or <code>DATSEQ</code>.
216 *
217 * @see #NULL
218 * @see #DATALT
219 * @see #DATSEQ
220 *
221 * @param valueType the type of DataElement to create:
222 * <code>NULL</code>, <code>DATALT</code>, or <code>DATSEQ</code>
223 *
224 * @exception IllegalArgumentException if <code>valueType</code>
225 * is not <code>NULL</code>, <code>DATALT</code>, or
226 * <code>DATSEQ</code>
227 */
228
229 public DataElement(int valueType) {
230 switch (valueType) {
231 case NULL:
232 value = null;
233 break;
234 case DATALT:
235 case DATSEQ:
236 value = new Vector();
237 break;
238 default:
239 throw new IllegalArgumentException();
240 }
241
242 this.valueType = valueType;
243 }
244
245 /**
246 * Creates a <code>DataElement</code> whose data type is
247 * <code>BOOL</code> and whose value is equal to <code>bool</code>
248 *
249 * @see #BOOL
250 *
251 * @param bool the value of the <code>DataElement</code> of type
252 * BOOL.
253 */
254
255 public DataElement(boolean bool) {
256 value = bool?Boolean.TRUE:Boolean.FALSE;
257 valueType = BOOL;
258 }
259
260 /**
261 * Creates a <code>DataElement</code> that encapsulates an integer
262 * value of size <code>U_INT_1</code>, <code>U_INT_2</code>,
263 * <code>U_INT_4</code>, <code>INT_1</code>, <code>INT_2</code>,
264 * <code>INT_4</code>, and <code>INT_8</code>.
265 * The legal values for the <code>valueType</code> and the corresponding
266 * attribute values are:
267 * <TABLE>
268 * <TR><TH>Value Type</TH><TH>Value Range</TH></TR>
269 * <TR><TD><code>U_INT_1</code></TD>
270 * <TD>[0, 2<sup>8</sup>-1]</TD></TR>
271 * <TR><TD><code>U_INT_2</code></TD>
272 * <TD>[0, 2<sup>16</sup>-1]</TD></TR>
273 * <TR><TD><code>U_INT_4</code></TD>
274 * <TD>[0, 2<sup>32</sup>-1]</TD></TR>
275 * <TR><TD><code>INT_1</code></TD>
276 * <TD>[-2<sup>7</sup>, 2<sup>7</sup>-1]</TD></TR>
277 * <TR><TD><code>INT_2</code></TD>
278 * <TD>[-2<sup>15</sup>, 2<sup>15</sup>-1]</TD></TR>
279 * <TR><TD><code>INT_4</code></TD>
280 * <TD>[-2<sup>31</sup>, 2<sup>31</sup>-1]</TD></TR>
281 * <TR><TD><code>INT_8</code></TD>
282 * <TD>[-2<sup>63</sup>, 2<sup>63</sup>-1]</TD></TR>
283 * </TABLE>
284 * All other pairings are illegal and will cause an
285 * <code>IllegalArgumentException</code> to be thrown.
286 *
287 * @see #U_INT_1
288 * @see #U_INT_2
289 * @see #U_INT_4
290 * @see #INT_1
291 * @see #INT_2
292 * @see #INT_4
293 * @see #INT_8
294 *
295 * @param valueType the data type of the object that is being
296 * created; must be one of the following:
297 * <code>U_INT_1</code>,
298 * <code>U_INT_2</code>,
299 * <code>U_INT_4</code>,
300 * <code>INT_1</code>,
301 * <code>INT_2</code>,
302 * <code>INT_4</code>, or
303 * <code>INT_8</code>
304 *
305 * @param value the value of the object being created; must be
306 * in the range specified for the given <code>valueType</code>
307 *
308 * @exception IllegalArgumentException if the <code>valueType</code>
309 * is not valid or the <code>value</code> for the given legal
310 * <code>valueType</code> is outside the valid range
311 *
312 */
313
314 public DataElement(int valueType, long value) {
315 switch (valueType) {
316 case U_INT_1:
317 if (value < 0 || value > 0xff)
318 throw new IllegalArgumentException(value + " not U_INT_1");
319 break;
320 case U_INT_2:
321 if (value < 0 || value > 0xffff)
322 throw new IllegalArgumentException(value + " not U_INT_2");
323 break;
324 case U_INT_4:
325 if (value < 0 || value > 0xffffffffl)
326 throw new IllegalArgumentException(value + " not U_INT_4");
327 break;
328 case INT_1:
329 if (value < -0x80 || value > 0x7f)
330 throw new IllegalArgumentException(value + " not INT_1");
331 break;
332 case INT_2:
333 if (value < -0x8000 || value > 0x7fff)
334 throw new IllegalArgumentException(value + " not INT_2");
335 break;
336 case INT_4:
337 if (value < -0x80000000 || value > 0x7fffffff)
338 throw new IllegalArgumentException(value + " not INT_4");
339 break;
340 case INT_8:
341 break;
342 default:
343 throw new IllegalArgumentException();
344 }
345
346 this.value = new Long(value);
347 this.valueType = valueType;
348 }
349
350 /**
351 * Creates a <code>DataElement</code> whose data type is given by
352 * <code>valueType</code> and whose value is specified by the argument
353 * <code>value</code>. The legal values for the <code>valueType</code>
354 * and the corresponding attribute values are:
355 * <TABLE>
356 * <TR><TH>Value Type</TH><TH>Java Type / Value Range</TH></TR>
357 * <TR><TD><code>URL</code></TD><TD><code>java.lang.String</code>
358 * </TD></TR>
359 * <TR><TD><code>UUID</code></TD>
360 * <TD><code>javax.bluetooth.UUID</code></TD></TR>
361 * <TR><TD><code>STRING</code></TD>
362 * <TD><code>java.lang.String</code></TD></TR>
363 * <TR><TD><code>INT_16</code></TD>
364 * <TD>[-2<sup>127</sup>, 2<sup>127</sup>-1] as a byte array
365 * whose length must be 16</TD></TR>
366 * <TR><TD><code>U_INT_8</code></TD>
367 * <TD>[0, 2<sup>64</sup>-1] as a byte array whose length must
368 * be 8</TD></TR>
369 * <TR><TD><code>U_INT_16</code></TD>
370 * <TD>[0, 2<sup>128</sup>-1] as a byte array whose length must
371 * be 16</TD></TR>
372 * </TABLE>
373 * All other pairings are illegal and would cause an
374 * <code>IllegalArgumentException</code> exception.
375 *
376 * @see #URL
377 * @see #UUID
378 * @see #STRING
379 * @see #U_INT_8
380 * @see #INT_16
381 * @see #U_INT_16
382 *
383 * @param valueType the data type of the object that is being
384 * created; must be one of the following: <code>URL</code>,
385 * <code>UUID</code>,
386 * <code>STRING</code>,
387 * <code>INT_16</code>,
388 * <code>U_INT_8</code>, or
389 * <code>U_INT_16</code>
390 *
391 * @param value the value for the <code>DataElement</code> being created
392 * of type <code>valueType</code>
393 *
394 * @exception IllegalArgumentException if the <code>value</code>
395 * is not of the <code>valueType</code> type or is not in the range
396 * specified or is <code>null</code>
397 *
398 */
399
400 public DataElement(int valueType, Object value) {
401 if (value == null)
402 throw new IllegalArgumentException();
403
404 switch (valueType) {
405 case URL:
406 case STRING:
407 if (!(value instanceof String))
408 throw new IllegalArgumentException();
409 break;
410 case UUID:
411 if (!(value instanceof UUID))
412 throw new IllegalArgumentException();
413 break;
414 case U_INT_8:
415 if (!(value instanceof byte[]) || ((byte[]) value).length != 8)
416 throw new IllegalArgumentException();
417 break;
418 case U_INT_16:
419 case INT_16:
420 if (!(value instanceof byte[]) || ((byte[]) value).length != 16)
421 throw new IllegalArgumentException();
422 break;
423 default:
424 throw new IllegalArgumentException();
425 }
426
427 this.value = value;
428 this.valueType = valueType;
429 }
430
431 /**
432 * Adds a <code>DataElement</code> to this <code>DATALT</code>
433 * or <code>DATSEQ</code> <code>DataElement</code> object.
434 * The <code>elem</code> will be added at the end of the list.
435 * The <code>elem</code> can be of any
436 * <code>DataElement</code> type, i.e., <code>URL</code>,
437 * <code>NULL</code>, <code>BOOL</code>, <code>UUID</code>,
438 * <code>STRING</code>, <code>DATSEQ</code>, <code>DATALT</code>,
439 * and the various signed and unsigned integer types.
440 * The same object may be added twice. If the object is
441 * successfully added the size of the <code>DataElement</code> is
442 * increased by one.
443 *
444 * @param elem the <code>DataElement</code> object to add
445 *
446 * @exception ClassCastException if the method is invoked on a
447 * <code>DataElement</code> whose type is not <code>DATALT</code>
448 * or <code>DATSEQ</code>
449 *
450 * @exception NullPointerException if <code>elem</code> is
451 * <code>null</code>
452 *
453 */
454
455 public void addElement(DataElement elem) {
456 if (elem == null)
457 throw new NullPointerException();
458
459 switch (valueType) {
460 case DATALT:
461 case DATSEQ:
462 ((Vector) value).addElement(elem);
463 break;
464 default:
465 throw new ClassCastException();
466 }
467 }
468
469 /**
470 * Inserts a <code>DataElement</code> at the specified location.
471 * This method can be invoked only on a <code>DATALT</code> or
472 * <code>DATSEQ</code> <code>DataElement</code>.
473 * <code>elem</code> can be of any <code>DataElement</code>
474 * type, i.e., <code>URL</code>, <code>NULL</code>,
475 * <code>BOOL</code>,
476 * <code>UUID</code>, <code>STRING</code>, <code>DATSEQ</code>,
477 * <code>DATALT</code>, and the various signed and unsigned
478 * integers. The same object may be added twice. If the object is
479 * successfully added the size will be increased by one.
480 * Each element with an index greater than or equal to the specified
481 * index is shifted upward to have an index one
482 * greater than the value it had previously.
483 * <P>
484 * The <code>index</code> must be greater than or equal to 0 and
485 * less than or equal to the current size. Therefore,
486 * <code>DATALT</code> and
487 * <code>DATSEQ</code> are zero-based objects.
488 *
489 * @param elem the <code>DataElement</code> object to add
490 *
491 * @param index the location at which to add the
492 * <code>DataElement</code>
493 *
494 * @throws ClassCastException if the method is invoked on an
495 * instance of <code>DataElement</code> whose type is not
496 * <code>DATALT</code> or <code>DATSEQ</code>
497 *
498 * @throws IndexOutOfBoundsException if <code>index</code>
499 * is negative or greater than
500 * the size of the <code>DATALT</code> or <code>DATSEQ</code>
501 *
502 * @throws NullPointerException if <code>elem</code> is
503 * <code>null</code>
504 *
505 */
506
507 public void insertElementAt(DataElement elem, int index) {
508 if (elem == null)
509 throw new NullPointerException();
510
511 switch (valueType) {
512 case DATALT:
513 case DATSEQ:
514 ((Vector) value).insertElementAt(elem, index);
515 break;
516 default:
517 throw new ClassCastException();
518 }
519 }
520
521 /**
522 * Returns the number of <code>DataElements</code> that are present
523 * in this <code>DATALT</code> or <code>DATSEQ</code> object.
524 * It is possible that the number of elements is equal to zero.
525 *
526 * @return the number of elements in this <code>DATALT</code>
527 * or <code>DATSEQ</code>
528 *
529 * @throws ClassCastException if this object is not of type
530 * <code>DATALT</code> or <code>DATSEQ</code>
531 */
532
533 public int getSize() {
534 switch (valueType) {
535 case DATALT:
536 case DATSEQ:
537 return ((Vector) value).size();
538 default:
539 throw new ClassCastException();
540 }
541 }
542
543
544
545 /**
546 * Removes the first occurrence of the <code>DataElement</code>
547 * from this object. <code>elem</code> may be of any type, i.e.,
548 * <code>URL</code>, <code>NULL</code>, <code>BOOL</code>,
549 * <code>UUID</code>, <code>STRING</code>, <code>DATSEQ</code>,
550 * <code>DATALT</code>, or the variously sized signed and unsigned
551 * integers.
552 * Only the first object in the list that is equal to
553 * <code>elem</code> will be removed. Other objects, if present,
554 * are not removed. Since this class doesn’t override the
555 * <code>equals()</code> method of the <code>Object</code> class,
556 * the remove method compares only the
557 * references of objects. If <code>elem</code> is
558 * successfully removed the size of this <code>DataElement</code>
559 * is decreased by one. Each <code>DataElement</code> in the
560 * <code>DATALT</code> or <code>DATSEQ</code> with an index greater
561 * than the index of <code>elem</code> is shifted downward to have
562 * an index one smaller than the value it had previously.
563 *
564 * @param elem the <code>DataElement</code> to be removed
565 *
566 * @return <code>true</code> if the input value was found and
567 * removed; else <code>false</code>
568 *
569 * @throws ClassCastException if this object is not of
570 * type <code>DATALT</code> or <code>DATSEQ</code>
571 *
572 * @throws NullPointerException if <code>elem</code> is
573 * <code>null</code>
574 */
575
576 public boolean removeElement(DataElement elem) {
577 if (elem == null)
578 throw new NullPointerException();
579
580 switch (valueType) {
581 case DATALT:
582 case DATSEQ:
583 return ((Vector) value).removeElement(elem);
584 default:
585 throw new ClassCastException();
586 }
587 }
588
589 /**
590 * Returns the data type of the object this <code>DataElement</code>
591 * represents.
592 *
593 * @return the data type of this <code>DataElement<code> object; the legal
594 * return values are:
595 * <code>URL</code>,
596 * <code>NULL</code>,
597 * <code>BOOL</code>,
598 * <code>UUID</code>,
599 * <code>STRING</code>,
600 * <code>DATSEQ</code>,
601 * <code>DATALT</code>,
602 * <code>U_INT_1</code>,
603 * <code>U_INT_2</code>,
604 * <code>U_INT_4</code>,
605 * <code>U_INT_8</code>,
606 * <code>U_INT_16</code>,
607 * <code>INT_1</code>,
608 * <code>INT_2</code>,
609 * <code>INT_4</code>,
610 * <code>INT_8</code>, or
611 * <code>INT_16</code>
612 *
613 */
614
615 public int getDataType() {
616 return valueType;
617 }
618
619
620
621 /**
622 * Returns the value of the <code>DataElement</code> if it can be
623 * represented as a <code>long</code>. The data type of the object must be
624 * <code>U_INT_1</code>,
625 * <code>U_INT_2</code>,
626 * <code>U_INT_4</code>,
627 * <code>INT_1</code>,
628 * <code>INT_2</code>,
629 * <code>INT_4</code>, or
630 * <code>INT_8</code>.
631 *
632 *
633 * @return the value of the <code>DataElement</code> as a <code>long</code>
634 *
635 * @throws ClassCastException if the data type of the object is not
636 * <code>U_INT_1</code>,
637 * <code>U_INT_2</code>,
638 * <code>U_INT_4</code>, <code>INT_1</code>,
639 * <code>INT_2</code>, <code>INT_4</code>,
640 * or <code>INT_8</code>
641 */
642
643 public long getLong() {
644 switch (valueType) {
645 case U_INT_1:
646 case U_INT_2:
647 case U_INT_4:
648 case INT_1:
649 case INT_2:
650 case INT_4:
651 case INT_8:
652 return ((Long) value).longValue();
653 default:
654 throw new ClassCastException();
655 }
656 }
657
658
659
660 /**
661 * Returns the value of the <code>DataElement</code> if it is represented as
662 * a <code>boolean</code>.
663 *
664 *
665 * @return the <code>boolean</code> value of this <code>DataElement</code>
666 * object
667 *
668 * @throws ClassCastException if the data type of this object is
669 * not of type <code>BOOL</code>
670 */
671
672 public boolean getBoolean() {
673 if (valueType == BOOL)
674 return ((Boolean) value).booleanValue();
675 else
676 throw new ClassCastException();
677 }
678
679 /**
680 * Returns the value of this <code>DataElement</code> as an
681 * <code>Object</code>. This method returns the appropriate Java
682 * object for the following data types:
683 * <code>URL</code>,
684 * <code>UUID</code>,
685 * <code>STRING</code>,
686 * <code>DATSEQ</code>,
687 * <code>DATALT</code>,
688 * <code>U_INT_8</code>,
689 * <code>U_INT_16</code>, and
690 * <code>INT_16</code>.
691 * Modifying the returned <code>Object</code> will not change this
692 * <code>DataElement</code>.
693 *
694 * The following are the legal pairs of data type
695 * and Java object type being returned.
696 * <TABLE>
697 * <TR><TH><code>DataElement</code> Data Type</code></TH>
698 * <TH>Java Data Type</TH></TR>
699 * <TR><TD><code>URL</code></TD><TD><code>java.lang.String</code>
700 * </TD></TR>
701 * <TR><TD><code>UUID</code></TD>
702 * <TD><code>javax.bluetooth.UUID</code></TD></TR>
703 * <TR><TD><code>STRING</code></TD><TD><code>java.lang.String
704 * </code></TD></TR>
705 * <TR><TD><code>DATSEQ</code></TD>
706 * <TD><code>java.util.Enumeration</code></TD></TR>
707 * <TR><TD><code>DATALT</code></TD>
708 * <TD><code>java.util.Enumeration</code></TD></TR>
709 * <TR><TD><code>U_INT_8</code></TD>
710 * <TD>byte[] of length 8</TD></TR>
711 * <TR><TD><code>U_INT_16</code></TD>
712 * <TD>byte[] of length 16</TD></TR>
713 * <TR><TD><code>INT_16</code></TD>
714 * <TD>byte[] of length 16</TD></TR>
715 * </TABLE>
716 *
717 * @return the value of this object
718 *
719 * @throws ClassCastException if the object is not a
720 * <code>URL</code>, <code>UUID</code>,
721 * <code>STRING</code>, <code>DATSEQ</code>, <code>DATALT</code>,
722 * <code>U_INT_8</code>,
723 * <code>U_INT_16</code>,
724 * or <code>INT_16</code>
725 *
726 */
727
728 public Object getValue() {
729 return null;
730 }
731
732 }