}
public void invoke(InputStream is, OutputStream os)
{
try {
Hessian2Input in = new Hessian2Input(is);
AbstractHessianOutput out;
SerializerFactory serializerFactory = getSerializerFactory();
in.setSerializerFactory(serializerFactory);
int code = in.read();
if (code != 'c') {
// XXX: deflate
throw new IOException(L.l("expected 'c' in hessian input at {0}",
code));
}
int major = in.read();
int minor = in.read();
if (major >= 2)
out = new Hessian2Output(os);
else
out = new HessianOutput(os);