public static Message readGIOPBody(ORB orb,
CorbaConnection connection,
Message msg)
{
ReadTimeouts readTimeouts =
orb.getORBData().getTransportTCPReadTimeouts();
ByteBuffer buf = msg.getByteBuffer();
buf.position(MessageBase.GIOPMessageHeaderLength);
int msgSizeMinusHeader =
msg.getSize() - MessageBase.GIOPMessageHeaderLength;
try {
buf = connection.read(buf,
GIOPMessageHeaderLength, msgSizeMinusHeader,
readTimeouts.get_max_time_to_wait());
} catch (IOException e) {
throw wrapper.ioexceptionWhenReadingConnection(e);
}
msg.setByteBuffer(buf);