Examples of readObject()


Examples of org.exoplatform.commons.serialization.serial.ObjectReader.readObject()

      ObjectWriter writer = new ObjectWriter(this, baos);
      writer.writeObject(o);
      writer.close();
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectReader in = new ObjectReader(this, bais);
      return (O)in.readObject();
   }

   public void write(Object o, OutputStream out) throws IOException
   {
      ObjectWriter writer = new ObjectWriter(this, out);
View Full Code Here

Examples of org.exoplatform.webui.application.replication.serial.ObjectReader.readObject()

      ObjectWriter writer = new ObjectWriter(this, baos);
      writer.writeObject(o);
      writer.close();
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectReader in = new ObjectReader(this, bais);
      return (O)in.readObject();
   }

   public byte[] write(Object o) throws IOException
   {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.fressian.FressianReader.readObject()

        List<Object> lst = new ArrayList<Object>();
        try {
            ByteArrayInputStream is = new ByteArrayInputStream(data);
            FressianReader r = new FressianReader(is, FressianTraceFormat.READ_LOOKUP);
            while (is.available() > 0) {
                lst.add(r.readObject());
            }
        } catch (IOException e) {
            log.error(ZorkaLogger.ZAG_ERRORS, "Should not happen.", e);
        }
        return lst;
View Full Code Here

Examples of org.glassfish.hk2.utilities.DescriptorImpl.readObject()

        return result;
    }
   
    private void parseInHk2LocatorOrig(BufferedReader reader, Map<String, String> cliCommandNames) throws IOException {
        DescriptorImpl desc = new DescriptorImpl();
        while (desc.readObject(reader)) {
            if (StringUtils.ok(desc.getName()) && desc.getAdvertisedContracts().contains(CLICommand.class.getName())) {
                cliCommandNames.put(desc.getName(), desc.getImplementation());
            }
        }
    }
View Full Code Here

Examples of org.gradle.internal.io.ClassLoaderObjectInputStream.readObject()

        this.serializedWorker = serializedWorker;
    }

    public Void call() throws Exception {
        ClassLoaderObjectInputStream instr = new ClassLoaderObjectInputStream(new ByteArrayInputStream(serializedWorker), getClass().getClassLoader());
        final Action<WorkerContext> action = (Action<WorkerContext>) instr.readObject();

        action.execute(new WorkerContext() {
            public ClassLoader getApplicationClassLoader() {
                return ClassLoader.getSystemClassLoader();
            }
View Full Code Here

Examples of org.gradle.util.ClassLoaderObjectInputStream.readObject()

        ClasspathUtil.addUrl((URLClassLoader) applicationClassLoader, GFileUtils.toURLs(applicationClassPath));
        System.setProperty("java.class.path", GUtil.join(applicationClassPath, File.pathSeparator));

        ClassLoaderObjectInputStream instr = new ClassLoaderObjectInputStream(new ByteArrayInputStream(
                serializedWorker), getClass().getClassLoader());
        final Action<WorkerContext> action = (Action<WorkerContext>) instr.readObject();

        action.execute(new WorkerContext() {
            public ClassLoader getApplicationClassLoader() {
                return applicationClassLoader;
            }
View Full Code Here

Examples of org.hornetq.jms.client.HornetQStreamMessage.readObject()

      HornetQStreamMessage message = new HornetQStreamMessage();
      message.writeBoolean(value);

      message.reset();

      Assert.assertEquals(value, message.readObject());
   }

   public void testReadObjectFromChar() throws Exception
   {
      char value = RandomUtil.randomChar();
View Full Code Here

Examples of org.hornetq.utils.ObjectInputStreamWithClassLoader.readObject()

         Thread.currentThread().setContextClassLoader(testClassLoader);

         ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
         org.hornetq.utils.ObjectInputStreamWithClassLoader ois = new ObjectInputStreamWithClassLoader(bais);

         Object deserializedObj = ois.readObject();

         Assert.assertNotSame(obj, deserializedObj);
         Assert.assertNotSame(obj.getClass(), deserializedObj.getClass());
         Assert.assertNotSame(obj.getClass().getClassLoader(), deserializedObj.getClass().getClassLoader());
         Assert.assertSame(testClassLoader, deserializedObj.getClass().getClassLoader());
View Full Code Here

Examples of org.hsqldb.persist.TextFileReader.readObject()

                nextpos += reader.readHeaderLine();
                cache.setHeaderInitialise(reader.getHeaderLine());
            }

            while (true) {
                RowInputInterface rowIn = reader.readObject(nextpos);

                if (rowIn == null) {
                    break;
                }
View Full Code Here

Examples of org.infinispan.commons.marshall.AdvancedExternalizer.readObject()

            default:
               throw new CacheException(String.format(
                     "Unknown index (%d) for externalizer %s",
                     index, this.getClass().getName()));
         }
         return ext.readObject(input);
      }

      @Override
      public Integer getId() {
         return 767;
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.