diff options
| author | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2005-06-07 22:38:15 +0000 |
|---|---|---|
| committer | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2005-06-07 22:38:15 +0000 |
| commit | ebcf590925c4fe5607db8c661ed82931d982702b (patch) | |
| tree | a15b4548b089842a553b42535606a185fbac5549 /gnu/CORBA/IOR.java | |
| parent | f4ffbd915c8e9d0a865489f83ac2961105ce92ee (diff) | |
| download | classpath-ebcf590925c4fe5607db8c661ed82931d982702b.tar.gz | |
2005-06-07 Audrius Meskauskas <AudriusA@Bioinformatics.org>.
* org/omg/CORBA/UnionMemberHelper.java
org/omg/CORBA/ValueMemberHelper.java
org/omg/CORBA/StructMemberHelper.java
org/omg/CORBA/IDLTypeHelper.java
org/omg/CORBA/_IDLTypeStub.java: New files.
* gnu/CORBA/IOR.java (write_null, _read_no_endian),
gnu/CORBA/CDR/cdrInput.java (read_Object),
gnu/CORBA/CDR/cdrOutput.java (write_Object):
Implemented sending of java null.
Diffstat (limited to 'gnu/CORBA/IOR.java')
| -rw-r--r-- | gnu/CORBA/IOR.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/CORBA/IOR.java b/gnu/CORBA/IOR.java index 056009f06..b2ff20e79 100644 --- a/gnu/CORBA/IOR.java +++ b/gnu/CORBA/IOR.java @@ -371,6 +371,13 @@ public class IOR * thansferred in this form in * {@link write_Object(org.omg.CORBA.Object)}. * + * If the stream contains a null value, the Id and Internet fields become + * equal to null. Otherwise Id contains some string (possibly + * empty). + * + * Id is checked for null in cdrInput that then returns + * null instead of object. + * * @param c a stream to read from. * @throws IOException if the stream throws it. */ @@ -381,6 +388,13 @@ public class IOR int n_profiles = c.read_long(); + if (n_profiles == 0) + { + Id = null; + Internet = null; + return; + } + for (int i = 0; i < n_profiles; i++) { int tag = c.read_long(); @@ -435,6 +449,21 @@ public class IOR } /** + * Write a null value to the CDR output stream. + * + * The null value is written as defined in OMG specification + * (zero length string, followed by an empty set of profiles). + */ + public static void write_null(cdrOutput out) + { + // Empty Id string. + out.write_string(""); + + // Empty set of profiles. + out.write_long(0); + } + + /** * Write this IOR record to the provided CDR stream. The procedure * writed data in Big Endian, but does NOT add any endian marker * to the beginning. |
