Package org.apache.qpid.client.util

Examples of org.apache.qpid.client.util.ClassLoadingAwareObjectInputStream


    private Serializable read(final ByteBuffer data) throws IOException, ClassNotFoundException
    {
        Serializable result = null;
        if (data != null && data.hasRemaining())
        {
            ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new ByteBufferInputStream(data));
            result = (Serializable) in.readObject();
        }
        return result;
    }
View Full Code Here


        }

        try
        {
            _data.rewind();
            in = new ClassLoadingAwareObjectInputStream(_data.asInputStream());

            return (Serializable) in.readObject();
        }
        catch (IOException e)
        {
View Full Code Here

    private Serializable read(final ByteBuffer data) throws IOException, ClassNotFoundException
    {
        Serializable result = null;
        if (data != null && data.hasRemaining())
        {
            ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new ByteBufferInputStream(data));
            try
            {
                result = (Serializable) in.readObject();
            }
            finally
            {
                in.close();
            }
        }
        return result;
    }
View Full Code Here

      {
          super(delegate, data!=null);

          try
          {
              ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new InputStream()
              {


                  @Override
                  public int read() throws IOException
                  {
                      return data.get();
                  }

                  @Override
                  public int read(byte[] b, int off, int len) throws IOException
                  {
                      len = data.remaining() < len ? data.remaining() : len;
                      data.get(b, off, len);
                      return len;
                  }
              });

              _readData = (Serializable) in.readObject();
          }
          catch (IOException e)
          {
              _exception = e;
          }
View Full Code Here

            Exception exception = null;

            final ByteBuffer data = _data.duplicate();
            try
            {
                ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new InputStream()
                {
                    @Override
                    public int read() throws IOException
                    {
                        return data.get();
                    }

                    @Override
                    public int read(byte[] b, int off, int len) throws IOException
                    {
                        len = data.remaining() < len ? data.remaining() : len;
                        data.get(b, off, len);
                        return len;
                    }
                });

                return (Serializable) in.readObject();
            }
            catch (ClassNotFoundException e)
            {
                exception = e;
            }
View Full Code Here

TOP

Related Classes of org.apache.qpid.client.util.ClassLoadingAwareObjectInputStream

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.