Examples of readObject()


Examples of de.ruedigermoeller.serialization.FSTObjectInput.readObject()

        try {
            @Cleanup
            ByteArrayInputStream is = new ByteArrayInputStream(bytes);
            FSTObjectInput ois = conf.getObjectInput(is);
            return (T) ois.readObject();
        } catch (Exception e) {
            log.warn("Fail to deserialize bytes.", e);
            return null;
        }
    }
View Full Code Here

Examples of extension.ExtendedObjectInputStream.readObject()

                ExtendedObjectInputStream si = new ExtendedObjectInputStream(fi);
                si.addRenamedClassName("install.SerialDriver",
                                       "test.SerialDriver");
                si.addRenamedClassName("[Linstall.SerialDriver;",
                                       "[Ltest.SerialDriver");
                obj = (SerialDriver) si.readObject();
                array = (SerialDriver[]) si.readObject();
                si.close();
            } catch (Exception e) {
                System.out.println(e);
                throw e;
View Full Code Here

Examples of flex.messaging.io.amf.Amf3Input.readObject()

  public <T> T fromAmf(final ByteArrayInputStream amf)
      throws ClassNotFoundException, IOException {
    Amf3Input amf3Input = new Amf3Input(context);
    amf3Input.setInputStream(amf);
    // Read object does the actual work of conversion.
    return (T) amf3Input.readObject();
  }

  public SerializationContext getContext() {
    return context;
  }
View Full Code Here

Examples of gnu.java.rmi.RMIMarshalledObjectInputStream.readObject()

    if (objBytes == null)
      return null;
   
    RMIMarshalledObjectInputStream stream =
      new RMIMarshalledObjectInputStream(objBytes, locBytes);
    return (T) stream.readObject();
  }

  public int hashCode()
  {
    return hash;
View Full Code Here

Examples of hudson.remoting.ObjectInputStreamEx.readObject()

                        Jenkins.getInstance().pluginManager.uberClassLoader);
                try {
                    long timestamp = ois.readLong();
                    if (TimeUnit2.HOURS.toMillis(1) > abs(System.currentTimeMillis()-timestamp))
                        // don't deserialize something too old to prevent a replay attack
                        return (ConsoleAnnotator)ois.readObject();
                } finally {
                    ois.close();
                }
            }
        } catch (GeneralSecurityException e) {
View Full Code Here

Examples of io.fabric8.dosgi.util.ClassLoaderObjectInputStream.readObject()

    }

    public void decodeResponse(ClassLoader loader, Class<?> type, DataByteArrayInputStream source, AsyncCallback result) throws IOException, ClassNotFoundException {
        ClassLoaderObjectInputStream ois = new ClassLoaderObjectInputStream(source);
        ois.setClassLoader(loader);
        Throwable error = (Throwable) ois.readObject();
        Object value = ois.readObject();
        if (error != null) {
            result.onFailure(error);
        } else {
            result.onSuccess(value);
View Full Code Here

Examples of java.beans.XMLDecoder.readObject()

  }
 
  protected void doLoad( InputStream in )
  {
    XMLDecoder decoder = new XMLDecoder( in );
    UserManagerConfig managerConfig = (UserManagerConfig)decoder.readObject();
    for (Iterator iter = managerConfig.getUsers().iterator(); iter.hasNext();) {
      UserProfile user = (UserProfile) iter.next();
      usersMap.put(user.getUsername().toLowerCase(), user);
    }
    System.out.println("UserManager: registered " + usersMap.size() + " users");
View Full Code Here

Examples of java.io.ByteArrayInputStream.readObject()

        DeserializationStrategy<Object> objectStrategy = new DeserializationStrategy<Object>() {
            @Override
            public Object deserialize(Deserializer in)
                    throws DeserializationException
            {
                return in.readObject();
            }
        };
       
        assertThat(objectStrategy.deserialize(d),not(nullValue()));
    }
View Full Code Here

Examples of java.io.FileInputStream.readObject()

        if (dataFile.exists() && dataFile.canRead()
            && dataFile.isFile()) {
          try {
            ObjectInputStream input = new ObjectInputStream(
                new FileInputStream(dataFile));
            Object result = input.readObject();
            // Type erasure, all that stuff ... not good ... noooot
            // good.
            input.close();
            workerStack = (Map<UUID, WorkerInfo>) result;
          } catch (Exception ex) {
View Full Code Here

Examples of java.io.InputStream.readObject()

        DeserializationStrategy<Object> objectStrategy = new DeserializationStrategy<Object>() {
            @Override
            public Object deserialize(Deserializer in)
                    throws DeserializationException
            {
                return in.readObject();
            }
        };
       
        assertThat(objectStrategy.deserialize(d),not(nullValue()));
    }
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.