Java Code Examples for com.sun.corba.se.impl.encoding.OSFCodeSetRegistry#UTF_16
The following examples show how to use
com.sun.corba.se.impl.encoding.OSFCodeSetRegistry#UTF_16 .
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: CDRInputObject.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 2
Source File: CDRInputObject.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 3
Source File: CDRInputObject.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 4
Source File: CDRInputObject.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 5
Source File: CDRInputObject.java From JDKSourceCode1.8 with MIT License | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 6
Source File: CDRInputObject.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 7
Source File: CDRInputObject.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 8
Source File: CDRInputObject.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 9
Source File: CDRInputObject.java From hottub with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 10
Source File: CDRInputObject.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; // For GIOP 1.2 and UTF-16, use big endian if there is no byte // order marker. (See issue 3405b) // // For GIOP 1.1 and UTF-16, use the byte order the stream if // there isn't (and there shouldn't be) a byte order marker. // // GIOP 1.0 doesn't have wchars. If we're talking to a legacy ORB, // we do what our old ORBs did. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) return CodeSetConversion.impl().getBTCConverter(wcharSet, false); } return CodeSetConversion.impl().getBTCConverter(wcharSet, isLittleEndian()); }
Example 11
Source File: CDROutputObject.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 12
Source File: CDROutputObject.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 13
Source File: CDROutputObject.java From hottub with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 14
Source File: CDROutputObject.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 15
Source File: CDROutputObject.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 16
Source File: CDROutputObject.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 17
Source File: CDROutputObject.java From JDKSourceCode1.8 with MIT License | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 18
Source File: CDROutputObject.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 19
Source File: CDROutputObject.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }
Example 20
Source File: CDROutputObject.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { CodeSetComponentInfo.CodeSetContext codesets = getCodeSets(); // If the connection doesn't have its negotiated // code sets by now, we have to throw an exception. // See CORBA formal 00-11-03 13.9.2.6. if (codesets == null) { if (getConnection().isServer()) throw omgWrapper.noClientWcharCodesetCtx() ; else throw omgWrapper.noServerWcharCodesetCmp() ; } OSFCodeSetRegistry.Entry wcharSet = OSFCodeSetRegistry.lookupEntry(codesets.getWCharCodeSet()); if (wcharSet == null) throw wrapper.unknownCodeset( wcharSet ) ; boolean useByteOrderMarkers = ((ORB)orb()).getORBData().useByteOrderMarkers(); // With UTF-16: // // For GIOP 1.2, we can put byte order markers if we want to, and // use the default of big endian otherwise. (See issue 3405b) // // For GIOP 1.1, we don't use BOMs and use the endianness of // the stream. if (wcharSet == OSFCodeSetRegistry.UTF_16) { if (getGIOPVersion().equals(GIOPVersion.V1_2)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, false, useByteOrderMarkers); } if (getGIOPVersion().equals(GIOPVersion.V1_1)) { return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), false); } } // In the normal case, let the converter system handle it return CodeSetConversion.impl().getCTBConverter(wcharSet, isLittleEndian(), useByteOrderMarkers); }