38 |
|
|
39 |
package javax.naming; |
package javax.naming; |
40 |
|
|
41 |
|
import java.io.IOException; |
42 |
|
import java.io.ObjectInputStream; |
43 |
|
import java.io.ObjectOutputStream; |
44 |
import java.io.Serializable; |
import java.io.Serializable; |
45 |
import java.util.Enumeration; |
import java.util.Enumeration; |
46 |
import java.util.NoSuchElementException; |
import java.util.NoSuchElementException; |
51 |
* @author Tom Tromey (tromey@redhat.com) |
* @author Tom Tromey (tromey@redhat.com) |
52 |
* @date May 16, 2001 |
* @date May 16, 2001 |
53 |
* |
* |
|
* FIXME: must write readObject and writeObject to conform to |
|
|
* serialization spec. |
|
|
* |
|
54 |
* FIXME: this class is underspecified. For instance, the `flat' |
* FIXME: this class is underspecified. For instance, the `flat' |
55 |
* direction is never described. If it means that the CompoundName |
* direction is never described. If it means that the CompoundName |
56 |
* can only have a single element, then the Enumeration-based |
* can only have a single element, then the Enumeration-based |
469 |
"false")).booleanValue (); |
"false")).booleanValue (); |
470 |
} |
} |
471 |
|
|
472 |
|
private void readObject(ObjectInputStream s) |
473 |
|
throws IOException, ClassNotFoundException |
474 |
|
{ |
475 |
|
mySyntax = (Properties) s.readObject(); |
476 |
|
int count = s.readInt(); |
477 |
|
elts = new Vector(count); |
478 |
|
for (int i = 0; i < count; i++) |
479 |
|
elts.addElement((String) s.readObject()); |
480 |
|
} |
481 |
|
|
482 |
|
private void writeObject(ObjectOutputStream s) |
483 |
|
throws IOException |
484 |
|
{ |
485 |
|
s.writeObject(mySyntax); |
486 |
|
s.writeInt(elts.size()); |
487 |
|
for (int i = 0; i < elts.size(); i++) |
488 |
|
s.writeObject(elts.elementAt(i)); |
489 |
|
} |
490 |
|
|
491 |
// The spec specifies this but does not document it in any way (it |
// The spec specifies this but does not document it in any way (it |
492 |
// is a package-private class). It is useless as far as I can tell. |
// is a package-private class). It is useless as far as I can tell. |
493 |
// So we ignore it. |
// So we ignore it. |