Java Code Examples for org.omg.CORBA.portable.OutputStream#write_Object()
The following examples show how to use
org.omg.CORBA.portable.OutputStream#write_Object() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StubIORImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public StubIORImpl( org.omg.CORBA.Object obj ) { // write the IOR to an OutputStream and get an InputStream OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream(); ostr.write_Object(obj); InputStream istr = ostr.create_input_stream(); // read the IOR components back from the stream int typeLength = istr.read_long(); typeData = new byte[typeLength]; istr.read_octet_array(typeData, 0, typeLength); int numProfiles = istr.read_long(); profileTags = new int[numProfiles]; profileData = new byte[numProfiles][]; for (int i = 0; i < numProfiles; i++) { profileTags[i] = istr.read_long(); profileData[i] = new byte[istr.read_long()]; istr.read_octet_array(profileData[i], 0, profileData[i].length); } }
Example 2
Source File: StubIORImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public StubIORImpl( org.omg.CORBA.Object obj ) { // write the IOR to an OutputStream and get an InputStream OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream(); ostr.write_Object(obj); InputStream istr = ostr.create_input_stream(); // read the IOR components back from the stream int typeLength = istr.read_long(); typeData = new byte[typeLength]; istr.read_octet_array(typeData, 0, typeLength); int numProfiles = istr.read_long(); profileTags = new int[numProfiles]; profileData = new byte[numProfiles][]; for (int i = 0; i < numProfiles; i++) { profileTags[i] = istr.read_long(); profileData[i] = new byte[istr.read_long()]; istr.read_octet_array(profileData[i], 0, profileData[i].length); } }
Example 3
Source File: StubIORImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
public StubIORImpl( org.omg.CORBA.Object obj ) { // write the IOR to an OutputStream and get an InputStream OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream(); ostr.write_Object(obj); InputStream istr = ostr.create_input_stream(); // read the IOR components back from the stream int typeLength = istr.read_long(); typeData = new byte[typeLength]; istr.read_octet_array(typeData, 0, typeLength); int numProfiles = istr.read_long(); profileTags = new int[numProfiles]; profileData = new byte[numProfiles][]; for (int i = 0; i < numProfiles; i++) { profileTags[i] = istr.read_long(); profileData[i] = new byte[istr.read_long()]; istr.read_octet_array(profileData[i], 0, profileData[i].length); } }
Example 4
Source File: StubIORImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public StubIORImpl( org.omg.CORBA.Object obj ) { // write the IOR to an OutputStream and get an InputStream OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream(); ostr.write_Object(obj); InputStream istr = ostr.create_input_stream(); // read the IOR components back from the stream int typeLength = istr.read_long(); typeData = new byte[typeLength]; istr.read_octet_array(typeData, 0, typeLength); int numProfiles = istr.read_long(); profileTags = new int[numProfiles]; profileData = new byte[numProfiles][]; for (int i = 0; i < numProfiles; i++) { profileTags[i] = istr.read_long(); profileData[i] = new byte[istr.read_long()]; istr.read_octet_array(profileData[i], 0, profileData[i].length); } }
Example 5
Source File: CorbaObjectReaderTest.java From cxf with Apache License 2.0 | 5 votes |
@Test public void testReadObjectReference() throws IOException { OutputStream oStream = orb.create_output_stream(); URL refUrl = getClass().getResource("/references/account.ref"); String oRef = IOUtils.toString(refUrl.openStream()).trim(); org.omg.CORBA.Object objRef = orb.string_to_object(oRef); assertNotNull(objRef); oStream.write_Object(objRef); // we need an ORBinstance to handle reading objects so use the input stream InputStream iStream = oStream.create_input_stream(); CorbaObjectReader reader = new CorbaObjectReader(iStream); // create a test object org.apache.cxf.binding.corba.wsdl.Object objectType = new org.apache.cxf.binding.corba.wsdl.Object(); objectType.setRepositoryID("IDL:Account:1.0"); objectType.setBinding(new QName("AccountCORBABinding")); QName objectName = new QName("TestObject"); QName objectIdlType = new QName("corbaatm:TestObject"); TypeCode objectTC = orb.create_interface_tc("IDL:Account:1.0", "TestObject"); CorbaObjectReferenceHandler obj = new CorbaObjectReferenceHandler(objectName, objectIdlType, objectTC, objectType); reader.readObjectReference(obj); assertTrue(obj.getReference()._is_equivalent(objRef)); }
Example 6
Source File: Util.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 7
Source File: Util.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 8
Source File: Util.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 9
Source File: Util.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 10
Source File: Util.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 11
Source File: Util.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 12
Source File: Util.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is * an exported RMI-IIOP server object, the tie is found * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. * If <code>obj</code> is a CORBA Object, it is written to * <code>out.write_Object(org.omg.CORBA.Object)</code>. * @param out the stream in which to write the object. * @param obj the object to write. */ public void writeRemoteObject(OutputStream out, java.lang.Object obj) { // Make sure we have a connected object, then // write it out... Object newObj = Utility.autoConnect(obj,out.orb(),false); out.write_Object((org.omg.CORBA.Object)newObj); }
Example 13
Source File: ObjectHolder.java From jdk1.8-source-analysis with Apache License 2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 14
Source File: ObjectHolder.java From JDKSourceCode1.8 with MIT License | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 15
Source File: ObjectHolder.java From openjdk-jdk8u with GNU General Public License v2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 16
Source File: ObjectHolder.java From openjdk-8-source with GNU General Public License v2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 17
Source File: ObjectHolder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 18
Source File: ObjectHolder.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 19
Source File: ObjectHolder.java From Java8CN with Apache License 2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }
Example 20
Source File: ObjectHolder.java From TencentKona-8 with GNU General Public License v2.0 | 2 votes |
/** * Marshals to <code>output</code> the value in * this <code>ObjectHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */ public void _write(OutputStream output) { output.write_Object(value); }