/** * The byteBuffer is presumed to have contents of the message already read in. It must have 12 bytes of space at the * beginning for the GIOP header, but the header doesn't have to be copied in. */ public void unmarshalRequestID(ByteBuffer byteBuffer) { int b1, b2, b3, b4; if (!isLittleEndian()) { b1 = (byteBuffer.get(GIOPMessageHeaderLength + 0) << 24) & 0xFF000000; b2 = (byteBuffer.get(GIOPMessageHeaderLength + 1) << 16) & 0x00FF0000; b3 = (byteBuffer.get(GIOPMessageHeaderLength + 2) << 8) & 0x0000FF00; b4 = (byteBuffer.get(GIOPMessageHeaderLength + 3) << 0) & 0x000000FF; } else { b1 = (byteBuffer.get(GIOPMessageHeaderLength + 3) << 24) & 0xFF000000; b2 = (byteBuffer.get(GIOPMessageHeaderLength + 2) << 16) & 0x00FF0000; b3 = (byteBuffer.get(GIOPMessageHeaderLength + 1) << 8) & 0x0000FF00; b4 = (byteBuffer.get(GIOPMessageHeaderLength + 0) << 0) & 0x000000FF; } this.request_id = (b1 | b2 | b3 | b4); }
/** * The byteBuffer is presumed to have contents of the message already read in. It must have 12 bytes of space at the * beginning for the GIOP header, but the header doesn't have to be copied in. */ public void unmarshalRequestID(ByteBuffer byteBuffer) { int b1, b2, b3, b4; if (!isLittleEndian()) { b1 = (byteBuffer.get(GIOPMessageHeaderLength + 0) << 24) & 0xFF000000; b2 = (byteBuffer.get(GIOPMessageHeaderLength + 1) << 16) & 0x00FF0000; b3 = (byteBuffer.get(GIOPMessageHeaderLength + 2) << 8) & 0x0000FF00; b4 = (byteBuffer.get(GIOPMessageHeaderLength + 3) << 0) & 0x000000FF; } else { b1 = (byteBuffer.get(GIOPMessageHeaderLength + 3) << 24) & 0xFF000000; b2 = (byteBuffer.get(GIOPMessageHeaderLength + 2) << 16) & 0x00FF0000; b3 = (byteBuffer.get(GIOPMessageHeaderLength + 1) << 8) & 0x0000FF00; b4 = (byteBuffer.get(GIOPMessageHeaderLength + 0) << 0) & 0x000000FF; } this.request_id = (b1 | b2 | b3 | b4); }