public MARSHAL wcharDataInGiop10(Throwable t) { return wcharDataInGiop10(CompletionStatus.COMPLETED_NO, t); }
public MARSHAL wcharDataInGiop10(CompletionStatus cs) { return wcharDataInGiop10(cs, null); }
public MARSHAL wcharDataInGiop10() { return wcharDataInGiop10(CompletionStatus.COMPLETED_NO, null); }
public MARSHAL wcharDataInGiop10(CompletionStatus cs) { return wcharDataInGiop10(cs, null); }
public MARSHAL wcharDataInGiop10() { return wcharDataInGiop10(CompletionStatus.COMPLETED_NO, null); }
public MARSHAL wcharDataInGiop10(Throwable t) { return wcharDataInGiop10(CompletionStatus.COMPLETED_NO, t); }
public String read_wstring() { // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } int len = read_long(); // Workaround for ORBs which send string lengths of zero to mean empty string. // // IMPORTANT: Do not replace 'new String("")' with "", it may result in a Serialization bug (See // serialization.zerolengthstring) and bug id: 4728756 for details if (len == 0) return new String(""); checkForNegativeLength(len); len--; char[] c = new char[len]; for (int i = 0; i < len; i++) c[i] = read_wchar(); // skip the two null terminator bytes read_wchar(); // bbwi.position(bbwi.position() + 2); return new String(c); }
public String read_wstring() { // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } int len = read_long(); // Workaround for ORBs which send string lengths of zero to mean empty string. // // IMPORTANT: Do not replace 'new String("")' with "", it may result in a Serialization bug (See // serialization.zerolengthstring) and bug id: 4728756 for details if (len == 0) return new String(""); checkForNegativeLength(len); len--; char[] c = new char[len]; for (int i = 0; i < len; i++) c[i] = read_wchar(); // skip the two null terminator bytes read_wchar(); // bbwi.position(bbwi.position() + 2); return new String(c); }
public void write_wchar(char x) { // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } // If it's one of our legacy ORBs, do what they did: alignAndReserve(2, 2); if (littleEndian) { writeLittleEndianWchar(x); } else { writeBigEndianWchar(x); } }
public void write_wchar(char x) { // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } // If it's one of our legacy ORBs, do what they did: alignAndReserve(2, 2); if (littleEndian) { writeLittleEndianWchar(x); } else { writeBigEndianWchar(x); } }
public void write_wstring(String value) { if (value == null) throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } // When talking to our legacy ORBs, do what they did: int len = value.length() + 1; // This will only have an effect if we're already chunking handleSpecialChunkBegin(4 + (len * 2) + computeAlignment(4)); write_long(len); for (int i = 0; i < len - 1; i++) write_wchar(value.charAt(i)); // Write the null ending write_short((short) 0); // This will only have an effect if we're already chunking handleSpecialChunkEnd(); }
public void write_wstring(String value) { if (value == null) throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } // When talking to our legacy ORBs, do what they did: int len = value.length() + 1; // This will only have an effect if we're already chunking handleSpecialChunkBegin(4 + (len * 2) + computeAlignment(4)); write_long(len); for (int i = 0; i < len - 1; i++) write_wchar(value.charAt(i)); // Write the null ending write_short((short) 0); // This will only have an effect if we're already chunking handleSpecialChunkEnd(); }
public char read_wchar() { // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } // If we're talking to one of our legacy ORBs, do what they did: int b1, b2; alignAndCheck(2, 2); if (littleEndian) { b2 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); b1 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); } else { b1 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); b2 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); } return (char) ((b1 << 8) + (b2 << 0)); }
public char read_wchar() { // Don't allow transmission of wchar/wstring data with foreign ORBs since it's against the spec. if (ORBUtility.isForeignORB(orb)) { throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); } // If we're talking to one of our legacy ORBs, do what they did: int b1, b2; alignAndCheck(2, 2); if (littleEndian) { b2 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); b1 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); } else { b1 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); b2 = bbwi.byteBuffer.get(bbwi.position()) & 0x00FF; bbwi.position(bbwi.position() + 1); } return (char) ((b1 << 8) + (b2 << 0)); }
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { // Wide characters don't exist in GIOP 1.0 if (getGIOPVersion().equals(GIOPVersion.V1_0)) throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); // In GIOP 1.1, we shouldn't have byte order markers. Take the order // of the stream if we don't see them. if (getGIOPVersion().equals(GIOPVersion.V1_1)) return CodeSetConversion.impl().getBTCConverter(OSFCodeSetRegistry.UTF_16, isLittleEndian()); // Assume anything else adheres to GIOP 1.2 requirements. // // Our UTF_16 converter will work with byte order markers, and if // they aren't present, it will use the provided endianness. // // With no byte order marker, it's big endian in GIOP 1.2. // formal 00-11-03 15.3.16. return CodeSetConversion.impl().getBTCConverter(OSFCodeSetRegistry.UTF_16, false); }
protected CodeSetConversion.BTCConverter createWCharBTCConverter() { // Wide characters don't exist in GIOP 1.0 if (getGIOPVersion().equals(GIOPVersion.V1_0)) throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); // In GIOP 1.1, we shouldn't have byte order markers. Take the order // of the stream if we don't see them. if (getGIOPVersion().equals(GIOPVersion.V1_1)) return CodeSetConversion.impl().getBTCConverter(OSFCodeSetRegistry.UTF_16, isLittleEndian()); // Assume anything else adheres to GIOP 1.2 requirements. // // Our UTF_16 converter will work with byte order markers, and if // they aren't present, it will use the provided endianness. // // With no byte order marker, it's big endian in GIOP 1.2. // formal 00-11-03 15.3.16. return CodeSetConversion.impl().getBTCConverter(OSFCodeSetRegistry.UTF_16, false); }
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { if (getGIOPVersion().equals(GIOPVersion.V1_0)) throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); // In the case of GIOP 1.1, we take the byte order of the stream and don't // use byte order markers since we're limited to a 2 byte fixed width encoding. if (getGIOPVersion().equals(GIOPVersion.V1_1)) return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.UTF_16, isLittleEndian(), false); // Assume anything else meets GIOP 1.2 requirements // // Use byte order markers? If not, use big endian in GIOP 1.2. // (formal 00-11-03 15.3.16) boolean useBOM = ((ORB) orb()).getORBData().useByteOrderMarkersInEncapsulations(); return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.UTF_16, false, useBOM); } }
protected CodeSetConversion.CTBConverter createWCharCTBConverter() { if (getGIOPVersion().equals(GIOPVersion.V1_0)) throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE); // In the case of GIOP 1.1, we take the byte order of the stream and don't // use byte order markers since we're limited to a 2 byte fixed width encoding. if (getGIOPVersion().equals(GIOPVersion.V1_1)) return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.UTF_16, isLittleEndian(), false); // Assume anything else meets GIOP 1.2 requirements // // Use byte order markers? If not, use big endian in GIOP 1.2. // (formal 00-11-03 15.3.16) boolean useBOM = ((ORB) orb()).getORBData().useByteOrderMarkersInEncapsulations(); return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.UTF_16, false, useBOM); } }