Examples of ClassLoaderObjectInputStream


Examples of io.fabric8.dosgi.util.ClassLoaderObjectInputStream

            result.onSuccess(value);
        }
    }

    public void decodeRequest(ClassLoader loader, Class<?>[] types, DataByteArrayInputStream source, Object[] target) throws IOException, ClassNotFoundException {
        final ClassLoaderObjectInputStream ois = new ClassLoaderObjectInputStream(source);
        ois.setClassLoader(loader);
        final Object[] args = (Object[]) ois.readObject();
        if( args!=null ) {
            System.arraycopy(args, 0, target, 0, args.length);
        }
    }
View Full Code Here

Examples of mx4j.loading.ClassLoaderObjectInputStream

      }

      ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
      try
      {
         return new ClassLoaderObjectInputStream(bais, classloader);
      }
      catch (IOException x)
      {
         throw new OperationsException(x.toString());
      }
View Full Code Here

Examples of mx4j.loading.ClassLoaderObjectInputStream

            if (is == null) throw new ServiceNotFoundException("Cannot find serialized MBean " + name + " in MLet " + this);

            InputStream bis = new BufferedInputStream(is);

            // Deserialize using the MLet classloader
            ObjectInputStream ois = new ClassLoaderObjectInputStream(bis, this);
            mbean = ois.readObject();
         }
         else
         {
            // Instantiate using the MLet classloader
            String clsName = tag.getCode();
View Full Code Here

Examples of mx4j.loading.ClassLoaderObjectInputStream

         {
            // Create the inputStream
            fin = new FileInputStream(m_store);

            // Use the ClassLoaderObjectInputStream
            clois = new ClassLoaderObjectInputStream(fin, Thread.currentThread().getContextClassLoader());
            try
            {
               // Try load the object using the ContextClassLoader
               result = clois.readObject();
            }
View Full Code Here

Examples of mx4j.loading.ClassLoaderObjectInputStream

            if (is == null) throw new ServiceNotFoundException("Cannot find serialized MBean " + name + " in MLet " + this);

            InputStream bis = new BufferedInputStream(is);

            // Deserialize using the MLet classloader
            ObjectInputStream ois = new ClassLoaderObjectInputStream(bis, this);
            mbean = ois.readObject();
         }
         else
         {
            // Instantiate using the MLet classloader
            String clsName = tag.getCode();
View Full Code Here

Examples of org.apache.avalon.excalibur.io.ClassLoaderObjectInputStream

            if( inputStream == null )
                  throw new NullPointerException("Null input stream returned for key: " + key );

            try
            {
                final ObjectInputStream stream = new ClassLoaderObjectInputStream( classLoader, inputStream );

                if( stream == null )
                  throw new NullPointerException("Null stream returned for key: " + key );

                final Object object = stream.readObject();

                if( DEBUG )
                {
                    getLogger().debug( "returning object " + object + " for key " + key );
                }
View Full Code Here

Examples of org.apache.avalon.excalibur.io.ClassLoaderObjectInputStream

            if( inputStream == null )
                  throw new NullPointerException("Null input stream returned for key: " + key );

            try
            {
                final ObjectInputStream stream = new ClassLoaderObjectInputStream( classLoader, inputStream );

                if( stream == null )
                  throw new NullPointerException("Null stream returned for key: " + key );

                final Object object = stream.readObject();

                if( DEBUG )
                {
                    getLogger().debug( "returning object " + object + " for key " + key );
                }
View Full Code Here

Examples of org.apache.avalon.excalibur.io.ClassLoaderObjectInputStream

            if( inputStream == null )
                  throw new NullPointerException("Null input stream returned for key: " + key );

            try
            {
                final ObjectInputStream stream = new ClassLoaderObjectInputStream( classLoader, inputStream );

                if( stream == null )
                  throw new NullPointerException("Null stream returned for key: " + key );

                final Object object = stream.readObject();

                if( DEBUG )
                {
                    getLogger().debug( "returning object " + object + " for key " + key );
                }
View Full Code Here

Examples of org.apache.commons.io.input.ClassLoaderObjectInputStream

        }
        ObjectInputStream in = null;
        try
        {
            // stream closed in the finally
            in = new ClassLoaderObjectInputStream(cl, inputStream);
            Object obj = in.readObject();
            if (obj instanceof DeserializationPostInitialisable)
            {
                DeserializationPostInitialisable.Implementation.init(obj, muleContext);
            }
View Full Code Here

Examples of org.apache.commons.io.input.ClassLoaderObjectInputStream

        {
            return null;
        }
        else
        {
            ClassLoaderObjectInputStream classLoaderIS = new ClassLoaderObjectInputStream(this.getClassLoader(),
                is);
            try
            {
                return classLoaderIS.readObject();
            }
            catch (ClassNotFoundException e)
            {
                logger.warn(e.getMessage());
                IOException iox = new IOException();
                iox.initCause(e);
                throw iox;
            }
            finally
            {
                classLoaderIS.close();
            }
        }
    }
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.