int code;
try
{
if ((code = in.read()) != 'H')
{
throw new HessianProtocolException("'" + (char) code + "' is an unknown code");
}
in.read();
in.read();
in.readEnvelope();
String h = in.readString();
if (!HEADER_STRING.equals(h))
{
throw new HessianProtocolException("Missing headers");
}
int l = in.readInt();
for (int i = 0; i < l; i++)
{
Integer key = in.readInt();
Object hvalue = in.readObject();
switch (key)
{
case ICALLBACK_ID_HEADER_KEY:
callbackId = (Long)hvalue;
break;
case ICALLBACK_METHOD_HEADER_KEY:
callbackMethod = (String) hvalue;
break;
case ICALLBACK_ARGS_HEADER_KEY:
callbackArgs = (Object[]) hvalue;
break;
case ICALLBACK_DONE_HEADER_KEY:
callbackDone = (Boolean) hvalue;
break;
case ICOMPLETED_HEADER_KEY:
completed = (Boolean) hvalue;
break;
case IGROUP_HEADER_KEY:
group = (Integer) hvalue;
break;
case ICALL_ID_HEADER_KEY:
callId = (Long) hvalue;
break;
}
}
if ((code = in.read()) != 'H')
{
throw new HessianProtocolException("'" + (char) code + "' is an unknown code");
}
in.read();
in.read();
Object obj = null;