summaryrefslogtreecommitdiff
path: root/libjava/classpath/org/omg/CORBA_2_3
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/classpath/org/omg/CORBA_2_3
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'libjava/classpath/org/omg/CORBA_2_3')
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/ORB.java129
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/package.html46
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java67
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java209
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java82
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java161
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/package.html47
7 files changed, 741 insertions, 0 deletions
diff --git a/libjava/classpath/org/omg/CORBA_2_3/ORB.java b/libjava/classpath/org/omg/CORBA_2_3/ORB.java
new file mode 100644
index 000000000..e45f03e2e
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/ORB.java
@@ -0,0 +1,129 @@
+/* ORB.java --
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA_2_3;
+
+import javax.rmi.CORBA.Tie;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.portable.ValueFactory;
+
+/**
+ * This class should provide the {@link org.omg.CORBA.ORB}) ORB extensions,
+ * defined in the OMG CORBA version 2.3 specification. However in the
+ * Sun's API specification is written that this functionality is not
+ * implemented at least at least till 1.4 inclusive.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ORB
+ extends org.omg.CORBA.ORB
+{
+ /**
+ * Should return a defintion of the value type as described
+ * in the interface repository.
+ *
+ * @param repository_id a value type repository id.
+ *
+ * @return never
+ * @throws BAD_PARAM never
+ * @throws NO_IMPLEMENT, always.
+ *
+ * @see org.omg.CORBA.portable.ValueBase
+ */
+ public org.omg.CORBA.Object get_value_def(String repository_id)
+ throws BAD_PARAM
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should register the given value factory under the given
+ * repository id.
+ *
+ * @param repository_id a repository id
+ *
+ * @return never
+ * @throws NO_IMPLEMENT, always.
+ */
+ public ValueFactory register_value_factory(String repository_id,
+ ValueFactory factory
+ )
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should unregister the given value factory under the given
+ * repository id.
+ *
+ * @param repository_id a repository id
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void unregister_value_factory(String repository_id)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should find a suitable value factory to create an instance
+ * of the value type when is being read (unmarshaled) from the
+ * stream.
+ *
+ * @param repository_id a repository id
+ *
+ * @return never
+ * @throws NO_IMPLEMENT, always.
+ */
+ public ValueFactory lookup_value_factory(String repository_id)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This method is called by RMI-IIOP {@link Tie#orb(ORB)},
+ * passing <code>this</code> as parameter. The ORB will try to connect
+ * that tie as one of its objects.
+ */
+ public void set_delegate(java.lang.Object wrapper)
+ {
+ throw new NO_IMPLEMENT();
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA_2_3/package.html b/libjava/classpath/org/omg/CORBA_2_3/package.html
new file mode 100644
index 000000000..254e6409a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - org.omg.CORBA_2_3</title></head>
+
+<body>
+<p>This package supports the ORB extendsions that appeared since CORBA 2_3.</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java b/libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java
new file mode 100644
index 000000000..a3d8ea933
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java
@@ -0,0 +1,67 @@
+/* Delegate.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA_2_3.portable;
+
+/**
+ * Extends the previous version of the Delegate by one additional method,
+ * defined in CORBA 2_3 .
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class Delegate
+ extends org.omg.CORBA.portable.Delegate
+{
+ /**
+ * Returns the codebase for the provided object reference.
+ * A codebase is a location information (for instance, URL), specifying,
+ * where the missing parts of the object code can be downloaded. This
+ * is important for the value type objects that handle they method calls
+ * locally and hence must have the local copy of the implementing code.
+ *
+ * This method must be overridden to get functionality, the default method
+ * always returns an empty string.
+ *
+ * @return normally, an agreed location information, specifying, where
+ * the supporting code (like java classes) can be found.
+ */
+ public String get_codebase(org.omg.CORBA.Object self)
+ {
+ return "";
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java
new file mode 100644
index 000000000..b457abe98
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java
@@ -0,0 +1,209 @@
+/* InputStream.java --
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA_2_3.portable;
+
+import gnu.CORBA.CDR.Vio;
+
+import org.omg.CORBA.CustomMarshal;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.StreamableValue;
+
+import java.io.Serializable;
+
+/**
+ * This class defines a new CDR input stream methods, added since
+ * CORBA 2.3.
+ *
+ * This class is abstract; no direct instances can be instantiated.
+ * Also, up till v 1.4 inclusive there are no methods that would
+ * return it, and only one unimplemented interface,
+ * {@link org.omg.CORBA.portable.ValueFactory }, needs it as a parameter.
+ *
+ * However since 1.3 all methods, declared as returning an
+ * org.omg.CORBA.portable.InputStream actually return the instance of this
+ * derived class and the new methods are accessible after the casting
+ * operation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class InputStream
+ extends org.omg.CORBA.portable.InputStream
+{
+ /**
+ * Read the abstract interface. An abstract interface can be either
+ * CORBA value type or CORBA object and is returned as an abstract
+ * java.lang.Object.
+ *
+ * As specified in OMG specification, this reads a single
+ * boolean and then delegates either to {@link #read_Object()} (for false)
+ * or to {@link #read_value()} (for true).
+ *
+ * @return an abstract interface, unmarshaled from the stream.
+ */
+ public Object read_abstract_interface()
+ {
+ boolean isObject = read_boolean();
+
+ if (isObject)
+ return read_Object();
+ else
+ return read_value();
+ }
+
+ /**
+ * Read the abstract interface, corresponding to the passed type.
+ * An abstract interface can be either CORBA value type or CORBA
+ * object and is returned as an abstract java.lang.Object.
+ *
+ * As specified in OMG specification, this reads a single
+ * boolean and then delegates either to {@link #read_Object(Class)} (for false)
+ * or to {@link #read_value(Class)} (for true).
+ *
+ * @param clz a base class for the abstract interface.
+ *
+ * @return an abstract interface, unmarshaled from the stream
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
+ public Object read_abstract_interface(Class clz)
+ {
+ boolean isValue = read_boolean();
+
+ if (isValue)
+ return read_value(clz);
+ else
+ return read_Object(clz);
+ }
+
+ /**
+ * Read a value type structure, extracting the repository id
+ * from the input stream itself. The repository id is optional
+ * in the value type record, but it must be present for this
+ * method to succeed. The {@link OutputStream} of this
+ * implementation always stores the repository id.
+ *
+ * The casts the streams ORB into a CORBA 2.3 ORB and then
+ * searched for a suitable value factory, where it delegates
+ * the functionality.
+ *
+ * If you know the exact class or can create an unitialised instance
+ * of the value type, it is recommended (faster) to use
+ * {@link #read_value(Class)} or {@link #read_value(Serializable)}
+ * instead.
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_value()
+ {
+ return Vio.read(this);
+ }
+
+ /**
+ * Read a value type structure, corresponing to the passed type.
+ * As the type is known, the repository Id in the input stream is
+ * optional an not required. The codebase, if present, is also ignored.
+ *
+ * The passed class must implement either {@link CustomMarshal}
+ * for the user-defined reading operations or {@link StreamableValue}
+ * for the standard (generated by IDL compiler) reading operations.
+ * Also, it must have the parameterless constructor to create a new
+ * instance.
+ *
+ * @param clz a base class for a value type.
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
+ public Serializable read_value(Class clz)
+ {
+ return Vio.read(this, clz);
+ }
+
+ /**
+ * Read a value type structure content, when the unitialised
+ * instance is passed as a parameter. It is a fastest method to read
+ * a value type.
+ *
+ * As the type is known, the repository Id in the input stream is
+ * optional an not required. The codebase, if present, is also ignored.
+ *
+ * The passed instance must implement either {@link CustomMarshal}
+ * for the user-defined reading operations or {@link StreamableValue}
+ * for the standard (generated by IDL compiler) reading operations.
+ *
+ * @param unitialised_value the unitialised value.
+ *
+ * @return same value, filled in by the stream content.
+ */
+ public Serializable read_value(Serializable unitialised_value)
+ {
+ return (Serializable) Vio.read(this, unitialised_value, null);
+ }
+
+ /**
+ * Read a value type structure, having the given repository id.
+ * The casts the streams ORB into a CORBA 2.3 ORB and then
+ * searched for a suitable value factory, where it delegates
+ * the functionality.
+ *
+ * If you know the exact class or can create an unitialised instance
+ * of the value type, it is recommended (faster) to use
+ * {@link #read_value(Class)} or {@link #read_value(Serializable)}
+ * instead.
+ *
+ * @param repository_id a repository id of the value type.
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_value(String repository_id)
+ {
+ return Vio.read(this, repository_id);
+ }
+
+ /**
+ * Use the provided boxed value helper to read the value.
+ *
+ * @param helper a helper for reading the value from the stream.
+ *
+ * @return an value type structure, unmarshaled from the stream.
+ */
+ public Serializable read_value(BoxedValueHelper helper)
+ {
+ return Vio.read(this, helper);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java b/libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java
new file mode 100644
index 000000000..552439189
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java
@@ -0,0 +1,82 @@
+/* ObjectImpl.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA_2_3.portable;
+
+import org.omg.CORBA.BAD_OPERATION;
+
+/**
+ * Extends the previous version of the CORBA object by one additional method,
+ * defined in CORBA 2_3 . See ancestor for details about the CORBA object.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectImpl
+ extends org.omg.CORBA.portable.ObjectImpl
+{
+ /**
+ * Returns the codebase for the provided object reference.
+ * A codebase is a location information (for instance, URL), specifying,
+ * where the missing parts of the object code can be downloaded. This
+ * is important for the value type objects that handle they method calls
+ * locally and hence must have the local copy of the implementing code.
+ *
+ * This implementation expects that the object delegate is set and is
+ * an instance of the org.omg.CORBA_2_3.portable.Delegate. If casts
+ * the set delegate to the given type and invokes
+ * {@link org.omg.CORBA_2_3.portable.Delegate#get_codebase}.
+ *
+ * @return normally, an agreed location information, specifying, where
+ * the supporting code (like java classes) can be found.
+ *
+ * @throws BAD_OPERATION if the object delegate is not an instance
+ * of org.omg.CORBA_2_3.portable.Delegate.
+ */
+ public String _get_codebase()
+ {
+ Object delegate = _get_delegate();
+ if (delegate instanceof org.omg.CORBA_2_3.portable.Delegate)
+ return ((org.omg.CORBA_2_3.portable.Delegate) delegate).get_codebase(this);
+ else if (delegate != null)
+ throw new BAD_OPERATION(delegate.getClass().getName() +
+ " is not a org.omg.CORBA_2_3.portable.Delegate"
+ );
+ else
+ throw new BAD_OPERATION("The delegate not set.");
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java
new file mode 100644
index 000000000..e9496ffce
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java
@@ -0,0 +1,161 @@
+/* OutputStream.java --
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA_2_3.portable;
+
+import gnu.CORBA.CDR.Vio;
+
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.CustomValue;
+import org.omg.CORBA.portable.StreamableValue;
+import org.omg.CORBA.portable.ValueBase;
+
+import java.io.Serializable;
+
+/**
+ * This class defines a new CDR input stream methods, added since
+ * CORBA 2.3.
+ *
+ * This class is abstract; no direct instances can be instantiated.
+ * Also, up till v 1.4 inclusive there are no methods that would
+ * return it directly.
+ *
+ * However since 1.3 all methods, declared as returning an
+ * org.omg.CORBA.portable.InputStream actually return the instance of this
+ * derived class and the new methods are accessible after the casting
+ * operation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class OutputStream
+ extends org.omg.CORBA.portable.OutputStream
+{
+ /**
+ * Writes an abstract interface to the stream. An abstract interface can be
+ * eithe CORBA object or value type and is written as a union with the boolean
+ * discriminator (false for objects, true for value types).
+ *
+ * The object from value is separated by fact that all values implement the
+ * {@link ValueBase} interface. Also, the passed parameter is treated as value
+ * it it does not implement CORBA Object.
+ *
+ * @param an_interface an abstract interface to write.
+ */
+ public void write_abstract_interface(java.lang.Object an_interface)
+ {
+ boolean isObject = !(an_interface instanceof ValueBase)
+ && an_interface instanceof org.omg.CORBA.Object;
+
+ write_boolean(isObject);
+
+ if (isObject)
+ write_Object((org.omg.CORBA.Object) an_interface);
+ else
+ write_value((Serializable) an_interface);
+
+ }
+
+ /**
+ * Writes a value type into the output stream.
+ *
+ * The value type must implement either {@link CustomValue} (for user-defined
+ * writing method) or {@link StreamableValue} (for standard writing using code,
+ * generated by IDL compiler).
+ *
+ * The written record will have a repository id, matching the class of the
+ * passed object. The codebase will not be written.
+ *
+ * @param value a value type object to write.
+ */
+ public void write_value(Serializable value)
+ {
+ Vio.write(this, value);
+ }
+
+ /**
+ * Write value to the stream using the boxed value helper.
+ *
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StreamableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * @param value a value to write.
+ * @param helper a helper, responsible for the writing operation.
+ */
+ public void write_value(Serializable value, BoxedValueHelper helper)
+ {
+ Vio.write(this, value, helper);
+ }
+
+ /**
+ * Writes a value type into the output stream, stating it is an
+ * instance of the given class. The written record
+ * will have a repository id, matching the passed class.
+ * The codebase will not be written. It the object
+ * being written is an instance of the different class, this results
+ * writing two Id inheritance hierarchy.
+ *
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StreamableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * @param value a value type object to write.
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
+ public void write_value(Serializable value, Class clz)
+ {
+ Vio.write(this, value, clz);
+ }
+
+ /**
+ * Writes a value type into the output stream, stating it has the given
+ * repository id.
+ *
+ * The value type must implement either {@link CustomValue} (for user-defined
+ * writing method) or {@link StreamableValue} (for standard writing using code,
+ * generated by IDL compiler).
+ *
+ * @param repository_id a repository id of the value type.
+ *
+ * @param value a value type object to write.
+ */
+ public void write_value(Serializable value, String repository_id)
+ {
+ Vio.write(this, value, repository_id);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/package.html b/libjava/classpath/org/omg/CORBA_2_3/portable/package.html
new file mode 100644
index 000000000..edf9eb731
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/package.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - org.omg.CORBA_2_3.portable</title></head>
+
+<body>
+<p>This package supports the communication extensions that appeared since CORBA 2_3.
+It mainly provides methods for input and output of value types. </p>
+
+</body>
+</html>