Java Code Examples for com.sun.corba.se.impl.encoding.EncapsInputStream#consumeEndian()
The following examples show how to use
com.sun.corba.se.impl.encoding.EncapsInputStream#consumeEndian() .
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: INSURLOperationImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 2
Source File: INSURLOperationImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 3
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected void getExceptionDetailMessage( CorbaMessageMediator messageMediator, ORBUtilSystemException wrapper) { ServiceContext sc = messageMediator.getReplyServiceContexts() .get(ExceptionDetailMessage.value); if (sc == null) return ; if (! (sc instanceof UnknownServiceContext)) { throw wrapper.badExceptionDetailMessageServiceContextType(); } byte[] data = ((UnknownServiceContext)sc).getData(); EncapsInputStream in = EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(), data, data.length); in.consumeEndian(); String msg = "----------BEGIN server-side stack trace----------\n" + in.read_wstring() + "\n" + "----------END server-side stack trace----------"; messageMediator.setReplyExceptionDetailMessage(msg); }
Example 4
Source File: INSURLOperationImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 5
Source File: INSURLOperationImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 6
Source File: INSURLOperationImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 7
Source File: CorbaClientRequestDispatcherImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected void getExceptionDetailMessage( CorbaMessageMediator messageMediator, ORBUtilSystemException wrapper) { ServiceContext sc = messageMediator.getReplyServiceContexts() .get(ExceptionDetailMessage.value); if (sc == null) return ; if (! (sc instanceof UnknownServiceContext)) { throw wrapper.badExceptionDetailMessageServiceContextType(); } byte[] data = ((UnknownServiceContext)sc).getData(); EncapsInputStream in = EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(), data, data.length); in.consumeEndian(); String msg = "----------BEGIN server-side stack trace----------\n" + in.read_wstring() + "\n" + "----------END server-side stack trace----------"; messageMediator.setReplyExceptionDetailMessage(msg); }
Example 8
Source File: INSURLOperationImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 9
Source File: INSURLOperationImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** This static method takes a Stringified IOR and converts it into IOR object. * It is the caller's responsibility to only pass strings that start with "IOR:". */ private org.omg.CORBA.Object getIORFromString( String str ) { // Length must be even for str to be valid if ( (str.length() & 1) == 1 ) throw wrapper.badStringifiedIorLen() ; byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE]; for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) { buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); } EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, orb.getORBData().getGIOPVersion()); s.consumeEndian(); return s.read_Object() ; }
Example 10
Source File: EncapsulationUtility.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** Helper method to read the octet array from is, deencapsulate it, * and return * as another InputStream. This must be called inside the * constructor of a derived class to obtain the correct stream * for unmarshalling data. */ static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, data.length ) ; result.consumeEndian() ; return result ; }
Example 11
Source File: IIOPProfileImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public IIOPProfileImpl( ORB orb, org.omg.IOP.TaggedProfile profile) { this( orb ) ; if (profile == null || profile.tag != TAG_INTERNET_IOP.value || profile.profile_data == null) { throw wrapper.invalidTaggedProfile() ; } EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data, profile.profile_data.length); istr.consumeEndian(); init( istr ) ; }
Example 12
Source File: EncapsulationUtility.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** Helper method to read the octet array from is, deencapsulate it, * and return * as another InputStream. This must be called inside the * constructor of a derived class to obtain the correct stream * for unmarshalling data. */ static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, data.length ) ; result.consumeEndian() ; return result ; }
Example 13
Source File: EncapsulationUtility.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** Helper method to read the octet array from is, deencapsulate it, * and return * as another InputStream. This must be called inside the * constructor of a derived class to obtain the correct stream * for unmarshalling data. */ static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, data.length ) ; result.consumeEndian() ; return result ; }
Example 14
Source File: IIOPProfileImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public IIOPProfileImpl( ORB orb, org.omg.IOP.TaggedProfile profile) { this( orb ) ; if (profile == null || profile.tag != TAG_INTERNET_IOP.value || profile.profile_data == null) { throw wrapper.invalidTaggedProfile() ; } EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data, profile.profile_data.length); istr.consumeEndian(); init( istr ) ; }
Example 15
Source File: EncapsulationUtility.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** Helper method to read the octet array from is, deencapsulate it, * and return * as another InputStream. This must be called inside the * constructor of a derived class to obtain the correct stream * for unmarshalling data. */ static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, data.length ) ; result.consumeEndian() ; return result ; }
Example 16
Source File: IIOPProfileImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
public IIOPProfileImpl( ORB orb, org.omg.IOP.TaggedProfile profile) { this( orb ) ; if (profile == null || profile.tag != TAG_INTERNET_IOP.value || profile.profile_data == null) { throw wrapper.invalidTaggedProfile() ; } EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data, profile.profile_data.length); istr.consumeEndian(); init( istr ) ; }
Example 17
Source File: EncapsulationUtility.java From hottub with GNU General Public License v2.0 | 5 votes |
/** Helper method to read the octet array from is, deencapsulate it, * and return * as another InputStream. This must be called inside the * constructor of a derived class to obtain the correct stream * for unmarshalling data. */ static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, data.length ) ; result.consumeEndian() ; return result ; }
Example 18
Source File: IIOPProfileImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public IIOPProfileImpl( ORB orb, org.omg.IOP.TaggedProfile profile) { this( orb ) ; if (profile == null || profile.tag != TAG_INTERNET_IOP.value || profile.profile_data == null) { throw wrapper.invalidTaggedProfile() ; } EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data, profile.profile_data.length); istr.consumeEndian(); init( istr ) ; }
Example 19
Source File: EncapsulationUtility.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** Helper method to read the octet array from is, deencapsulate it, * and return * as another InputStream. This must be called inside the * constructor of a derived class to obtain the correct stream * for unmarshalling data. */ static public InputStream getEncapsulationStream( InputStream is ) { byte[] data = readOctets( is ) ; EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data, data.length ) ; result.consumeEndian() ; return result ; }
Example 20
Source File: IIOPProfileImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public IIOPProfileImpl( ORB orb, org.omg.IOP.TaggedProfile profile) { this( orb ) ; if (profile == null || profile.tag != TAG_INTERNET_IOP.value || profile.profile_data == null) { throw wrapper.invalidTaggedProfile() ; } EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data, profile.profile_data.length); istr.consumeEndian(); init( istr ) ; }