Examples of readObject()


Examples of ca.eandb.util.io.AlternateClassLoaderObjectInputStream.readObject()

      ByteArrayInputStream byteStream = new ByteArrayInputStream(data);
      GZIPInputStream gzipStream = new GZIPInputStream(byteStream);
      try {
        ObjectInputStream objectStream = new AlternateClassLoaderObjectInputStream(
            gzipStream, loader);
        object = (T) objectStream.readObject();
        return object;
      } finally {
        gzipStream.close();
      }
    } catch (IOException e) {
View Full Code Here

Examples of ch.njol.yggdrasil.YggdrasilInputStream.readObject()

    assert (s = type.getSerializer()) != null && (s.mustSyncDeserialization() ? Bukkit.isPrimaryThread() : true);
    YggdrasilInputStream in = null;
    try {
      value = new SequenceInputStream(new ByteArrayInputStream(getYggdrasilStart(type)), value);
      in = Variables.yggdrasil.newInputStream(value);
      return in.readObject();
    } catch (final IOException e) { // i.e. invalid save
      if (Skript.testing())
        e.printStackTrace();
      return null;
    } finally {
View Full Code Here

Examples of com.alibaba.citrus.hessian.io.Hessian2Input.readObject()

    public Object deserialize(InputStream is) throws Exception {
        Hessian2Input hi = null;

        try {
            hi = new Hessian2Input(is);
            return hi.readObject();
        } finally {
            if (hi != null) {
                try {
                    hi.close();
                } catch (IOException e) {
View Full Code Here

Examples of com.alibaba.com.caucho.hessian.io.Hessian2Input.readObject()

      os.close();
      if( i == 0 )
        len = os.toByteArray().length;
      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
      Hessian2Input in = new Hessian2Input(is);
      assertEquals(in.readObject().getClass(), Bean.class);
    }
    System.out.println("Hessian2 write and parse 500 times in " + (System.currentTimeMillis()-now)+"ms, size " + len);
  }

  @Test
View Full Code Here

Examples of com.alibaba.dubbo.common.serialize.ObjectInput.readObject()

                            byte[] value = jedisPool.getResource().get(String.valueOf(invocation.getArguments()[0]).getBytes());
                            if (value == null) {
                                return new RpcResult();
                            }
                            ObjectInput oin = getSerialization(url).deserialize(url, new ByteArrayInputStream(value));
                            return new RpcResult(oin.readObject());
                        } else if (set.equals(invocation.getMethodName())) {
                            if (invocation.getArguments().length != 2) {
                                throw new IllegalArgumentException("The redis set method arguments mismatch, must be two arguments. interface: " + type.getName() + ", method: " + invocation.getMethodName() + ", url: " + url);
                            }
                            byte[] key = String.valueOf(invocation.getArguments()[0]).getBytes();
View Full Code Here

Examples of com.alibaba.dubbo.common.serialize.support.java.CompactedObjectInputStream.readObject()

      os.close();
      if( i == 0 )
        len = os.toByteArray().length;
      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
      CompactedObjectInputStream in = new CompactedObjectInputStream(is);
      assertEquals(in.readObject().getClass(), Bean.class);
    }
    System.out.println("compacted java write and parse 500 times in " + (System.currentTimeMillis()-now)+"ms, size " + len);
  }

  public static enum EnumTest { READ, WRITE, CREATE, UNREGISTER };
View Full Code Here

Examples of com.alibaba.fastjson.JSONReader.readObject()

        reader.startObject();

        int count = 0;
        while (reader.hasNext()) {
            String key = (String) reader.readObject();
            Long value = reader.readLong();
            count++;
        }
        Assert.assertEquals(10, count);
View Full Code Here

Examples of com.alphacsp.cit.commands.XmlCommandsReader.readObject()

        interperter.setEnvironment(environment);

        XmlCommandsReader commandsReader = new XmlCommandsReader();
        commandsReader.setClassLoader(classLoader);
        commandsReader.setXmlFile(new DefaultResource(commandsFileLocation));
        CommandsTemplate groups = commandsReader.readObject();
        interperter.setCommandsTemplate(groups);

        return interperter;
    }
View Full Code Here

Examples of com.betfair.cougar.transport.api.protocol.CougarObjectInput.readObject()

            incrementOutstandingRequests();
            super.process(command);    //To change body of overridden methods use File | Settings | File Templates.
        } else {
            try {
                CougarObjectInput input = command.getInput();
                Object eventPayload = input.readObject();
                input.close();

                if (eventPayload instanceof TerminateSubscription) {
                    connectedObjectManager.terminateSubscription(command.getSession(), (TerminateSubscription) eventPayload);
                } else {
View Full Code Here

Examples of com.caucho.hessian.io.AbstractHessianInput.readObject()

      AbstractHessianInput in = _factory.getHessianInput(is);

      in.startReply();

      Object value = in.readObject(method.getReturnType());

      if (value instanceof InputStream) {
  value = new ResultInputStream(httpConn, is, in, (InputStream) value);
  is = null;
  httpConn = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.