1 7 package com.sun.corba.se.impl.protocol.giopmsgheaders; 8 9 import java.nio.ByteBuffer ; 10 11 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 12 13 public class Message_1_2 extends Message_1_1 14 { 15 protected int request_id = (int) 0; 16 17 Message_1_2() {} 18 19 Message_1_2(int _magic, GIOPVersion _GIOP_version, byte _flags, 20 byte _message_type, int _message_size) { 21 22 super(_magic, 23 _GIOP_version, 24 _flags, 25 _message_type, 26 _message_size); 27 } 28 29 34 public void unmarshalRequestID(ByteBuffer byteBuffer) { 35 int b1, b2, b3, b4; 36 37 if (!isLittleEndian()) { 38 b1 = (byteBuffer.get(GIOPMessageHeaderLength+0) << 24) & 0xFF000000; 39 b2 = (byteBuffer.get(GIOPMessageHeaderLength+1) << 16) & 0x00FF0000; 40 b3 = (byteBuffer.get(GIOPMessageHeaderLength+2) << 8) & 0x0000FF00; 41 b4 = (byteBuffer.get(GIOPMessageHeaderLength+3) << 0) & 0x000000FF; 42 } else { 43 b1 = (byteBuffer.get(GIOPMessageHeaderLength+3) << 24) & 0xFF000000; 44 b2 = (byteBuffer.get(GIOPMessageHeaderLength+2) << 16) & 0x00FF0000; 45 b3 = (byteBuffer.get(GIOPMessageHeaderLength+1) << 8) & 0x0000FF00; 46 b4 = (byteBuffer.get(GIOPMessageHeaderLength+0) << 0) & 0x000000FF; 47 } 48 49 this.request_id = (b1 | b2 | b3 | b4); 50 } 51 52 public void write(org.omg.CORBA.portable.OutputStream ostream) { 53 if (this.encodingVersion == Message.CDR_ENC_VERSION) { 54 super.write(ostream); 55 return; 56 } 57 GIOPVersion gv = this.GIOP_version; this.GIOP_version = GIOPVersion.getInstance((byte)13, 59 this.encodingVersion); 60 super.write(ostream); 61 this.GIOP_version = gv; } 63 } 64 65 | Popular Tags |