public AbstractHessianInput open(InputStream is) throws IOException { int code = is.read(); int major = is.read(); int minor = is.read(); switch (code) { case 'c': case 'C': case 'r': case 'R': if (major >= 2) { return _factory.createHessian2Input(is); } else { return _factory.createHessianInput(is); } default: throw new IOException((char) code + " is an unknown Hessian message code."); } }
public AbstractHessianInput open(InputStream is) throws IOException { int code = is.read(); int major = is.read(); int minor = is.read(); switch (code) { case 'c': case 'C': case 'r': case 'R': if (major >= 2) { return _factory.createHessian2Input(is); } else { return _factory.createHessianInput(is); } default: throw new IOException((char) code + " is an unknown Hessian message code."); } }
public AbstractHessianInput open(InputStream is) throws IOException { int code = is.read(); int major = is.read(); int minor = is.read(); switch (code) { case 'c': case 'C': case 'r': case 'R': if (major >= 2) { return _factory.createHessian2Input(is); } else { return _factory.createHessianInput(is); } default: throw new IOException((char) code + " is an unknown Hessian message code."); } }
/** * Deserialize the data */ @Override public Object deserialize(InputStream is) throws IOException { if (log.isLoggable(Level.FINEST)) is = new HessianDebugInputStream(is, log, Level.FINEST); Hessian2Input hIn = _hessianFactory.createHessian2Input(is); Object value = hIn.readObject(); hIn.close(); _hessianFactory.freeHessian2Input(hIn); return value; } }
@Override public Object unmarshal(final Exchange exchange, final InputStream inputStream) throws Exception { final Hessian2Input in; if (!whitelistEnabled) { in = new Hessian2Input(inputStream); } else { HessianFactory factory = new HessianFactory(); if (ObjectHelper.isNotEmpty(allowedUnmarshallObjects)) { factory.allow(allowedUnmarshallObjects); } if (ObjectHelper.isNotEmpty(deniedUnmarshallObjects)) { factory.deny(deniedUnmarshallObjects); } in = factory.createHessian2Input(inputStream); } try { in.startMessage(); final Object obj = in.readObject(); in.completeMessage(); return obj; } finally { try { in.close(); } catch (IOException e) { // ignore } } }
in = _hessianFactory.createHessian2Input(is); in.readCall(); out = _hessianFactory.createHessian2Output(os);
in = _hessianFactory.createHessian2Input(is); in.readCall(); out = _hessianFactory.createHessian2Output(os);