public byte [] toCDR () { final CDROutputStream out = new CDROutputStream(); try { out.beginEncapsulatedArray(); this.write(out); return out.getBufferCopy(); } finally { out.close(); } }
public byte[] encode(Any data) throws InvalidTypeForEncoding { final CDROutputStream out = new CDROutputStream(orb); try { out.beginEncapsulatedArray(); out.write_any(data); // do not end encapsulation since it will patch the // array with a size! return out.getBufferCopy(); } finally { out.close(); } }
public byte[] encode_value(Any data) throws InvalidTypeForEncoding { final CDROutputStream out = new CDROutputStream(orb); try { out.beginEncapsulatedArray(); data.write_value(out); // do not end encapsulation since it will patch the // array with a size! return out.getBufferCopy(); } finally { out.close(); } } }
/** * Returns a CDR encapsulation of the given UtcT. */ public static byte[] toCDR(UtcT time) { final CDROutputStream out = new CDROutputStream(); try { out.beginEncapsulatedArray(); UtcTHelper.write(out, time); return out.getBufferCopy(); } finally { out.close(); } }
private TaggedProfile createMultipleComponentsProfile (TaggedComponentList components) { CDROutputStream out = new CDROutputStream(this); out.beginEncapsulatedArray(); MultipleComponentProfileHelper.write(out, components.asArray()); return new TaggedProfile ( TAG_MULTIPLE_COMPONENTS.value, out.getBufferCopy() ); }
/** * The group object key, or the tagGroup as a byte array. * * @return tagGroup as a byte array. */ @Override public byte[] get_object_key () { if (objectKey == null) { CDROutputStream out = new CDROutputStream (); out.beginEncapsulatedArray (); TagGroupTaggedComponentHelper.write (out, tagGroup); objectKey = out.getBufferCopy (); out.close(); } return objectKey; }
/** * Creates an ORB_TYPE_ID tagged component for JacORB. */ private TaggedComponent create_ORB_TYPE_ID() { final CDROutputStream out = new CDROutputStream( this ); try { out.beginEncapsulatedArray(); out.write_long( ORBConstants.JACORB_ORB_ID ); return new TaggedComponent ( TAG_ORB_TYPE.value, out.getBufferCopy() ); } finally { out.close(); } }
/** * Creates a ServiceContext for transmitting an exception detail message, * as per section 1.15.2 of the Java Mapping. */ public static ServiceContext createExceptionDetailMessage (String message) { final CDROutputStream out = new CDROutputStream(); try { out.beginEncapsulatedArray(); out.write_wstring(message); return new ServiceContext(org.omg.IOP.ExceptionDetailMessage.value, out.getBufferCopy()); } finally { out.close(); } }
/** * Encode this profile as a TaggedProfile (marshaled). * * @param taggedProfile a tagged profile holder. * @param taggedComponentSeq unused. */ @Override public void marshal (TaggedProfileHolder taggedProfile, TaggedComponentSeqHolder taggedComponentSeq) { if (data == null) { CDROutputStream out = new CDROutputStream (); out.beginEncapsulatedArray (); UIPMC_ProfileBodyHelper.write (out, uipmc); data = out.getBufferCopy (); out.close (); } taggedProfile.value = new TaggedProfile (TAG_UIPMC.value, data); }
private ServiceContext createInvocationPolicies() { final CDROutputStream out = new CDROutputStream( orb ); try { out.beginEncapsulatedArray(); PolicyValueSeqHelper.write(out, getTimingPolicyValues()); return new ServiceContext (INVOCATION_POLICIES.value, out.getBufferCopy()); } finally { out.close(); } } }
try out.beginEncapsulatedArray(); out.write_long(ORBConstants.JACORB_ORB_ID); components.addComponent
try out.beginEncapsulatedArray(); out.write_long(ORBConstants.JACORB_ORB_ID); components.addComponent
out.beginEncapsulatedArray(); data.write_value(out);
out.beginEncapsulatedArray(); out.write_any(data);
private static byte[] getEncapsulatedUIPMCProfile (org.jacorb.orb.ORB orb, ClientConnection connection, UIPMC_ProfileBody upb) { CDROutputStream out = new CDROutputStream (orb); out.beginEncapsulatedArray (); if (connection != null) { UIPMC_ProfileBodyHelper.write (out, ((MIOPProfile)connection.getRegisteredProfile ()).getUIPMCProfile ()); } else { UIPMC_ProfileBodyHelper.write (out, upb); } byte []result = out.getBufferCopy (); out.close(); return result; } }
private ServiceContext createCodesetContext( CodeSet tcs, CodeSet tcsw ) { // encapsulate context final CDROutputStream os = new CDROutputStream( orb ); try { os.beginEncapsulatedArray(); CodeSetContextHelper.write( os, new CodeSetContext( tcs.getId(), tcsw.getId() )); return new ServiceContext( TAG_CODE_SETS.value, os.getBufferCopy() ); } finally { os.close(); } }
public CodeSetInfoInterceptor(ORB orb) throws ConfigurationException { super(); configure(orb.getConfiguration()); // encapsulate it into TaggedComponent final CDROutputStream out = new CDROutputStream( orb ); try { out.beginEncapsulatedArray(); CodeSetComponentInfoHelper.write( out, orb.getLocalCodeSetComponentInfo() ); tagc = new TaggedComponent(TAG_CODE_SETS.value, out.getBufferCopy()); } finally { out.close(); } }
private void decode_extensions(String ident) throws ConfigurationException { this.components = new TaggedComponentList(); if (ident.equals("ssliop")) { ssl = new SSL(); ssl.port = (short)primaryAddress.getPort(); ssl.target_supports = get_ssl_options("jacorb.security.ssl.corbaloc_ssliop.supported_options"); ssl.target_requires = get_ssl_options("jacorb.security.ssl.corbaloc_ssliop.required_options"); isSSLSet = true; //create the tagged component containing the ssl struct final CDROutputStream out = new CDROutputStream(); try { out.beginEncapsulatedArray(); SSLHelper.write( out, ssl ); // TAG_SSL_SEC_TRANS must be disambiguated in case OpenORB-generated // OMG classes are in the classpath. components.addComponent (new TaggedComponent( org.omg.SSLIOP.TAG_SSL_SEC_TRANS.value, out.getBufferCopy() ) ); } finally { out.close(); } } }