Package net.razorvine.pickle

Examples of net.razorvine.pickle.Unpickler


      } catch (DataFormatException e) {
        throw new PyroException("invalid compressed data: ", e);
      }
    }
    if ((resultmsg.flags & MessageFactory.FLAGS_EXCEPTION) != 0) {
      Unpickler unpickler=new Unpickler();
      Throwable rx = (Throwable) unpickler.loads(resultmsg.data);
      unpickler.close();
      if (rx instanceof PyroException) {
        throw (PyroException) rx;
      } else {
        PyroException px = new PyroException("remote exception occurred", rx);
        try {
          Field remotetbField = rx.getClass().getDeclaredField("_pyroTraceback");
          String remotetb = (String) remotetbField.get(rx);
          px._pyroTraceback = remotetb;
        } catch (Exception e) {
          // exception didn't provide a pyro remote traceback
        }
        throw px;
      }
    }
    Unpickler unpickler=new Unpickler();
    Object result=unpickler.loads(resultmsg.data);
    unpickler.close();
    return result;
  }
View Full Code Here


import org.junit.Test;

public class UnpicklerTest {
  @Test
  public void testSomething() throws Exception {
    Unpickler u = new Unpickler();
   
    Object f = u.load(getClass().getResourceAsStream("/kwargs.bin"));
   
    int i = 0;
   
    i++;
  }
View Full Code Here

TOP

Related Classes of net.razorvine.pickle.Unpickler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.