// wrap requestOutput stream in a MarshalOutputStream
MarshalOutputStream marshalledRequest = new MarshalOutputStream(
requestOutput, new ArrayList());
// write method hash
marshalledRequest.writeLong(methodHash);
// write method args
if (methodArgs != null) {
for (int i = 0; i < methodArgs.length; i++) {
Util.marshalValue(methodArgs[i],marshalledRequest);