OutputStream osToUse = outputStream;
if (this.debugLogger != null && this.debugLogger.isDebugEnabled()) {
PrintWriter debugWriter = new PrintWriter(new CommonsLogWriter(this.debugLogger));
isToUse = new HessianDebugInputStream(inputStream, debugWriter);
osToUse = new HessianDebugOutputStream(outputStream, debugWriter);
}
Hessian2Input in = new Hessian2Input(isToUse);
if (this.serializerFactory != null) {
in.setSerializerFactory(this.serializerFactory);