Package org.jboss.soa.esb.util

Examples of org.jboss.soa.esb.util.ContextObjectInputStream


  {
    if (super.get(BytesBody.BYTES_LOCATION) == null)
      throw new IOException();
   
    _mode = READ_MODE;
    _inputStream = new ContextObjectInputStream(new ByteArrayInputStream((byte[]) super
        .get(BytesBody.BYTES_LOCATION)));
    _outputStream = null;
    _byteStream = null;
  }
View Full Code Here


        {
            final ByteArrayInputStream bais = new ByteArrayInputStream(serialisedForm) ;
            final ObjectInputStream ois ;
            try
            {
                ois = new ContextObjectInputStream(bais) ;
            }
            catch (final IOException ioe)
            {
                throw new DeferredDeserialisationException("Error creating object input stream", ioe) ;
            }
View Full Code Here

  {
    if (super.get(BytesBody.BYTES_LOCATION) == null)
      throw new IOException();
   
    _mode = READ_MODE;
    _inputStream = new ContextObjectInputStream(new ByteArrayInputStream((byte[]) super
        .get(BytesBody.BYTES_LOCATION)));
    _outputStream = null;
    _byteStream = null;
  }
View Full Code Here

        ObjectOutputStream output = new ObjectOutputStream(bostream);
       
        output.writeObject(this);
       
        ByteArrayInputStream bistream = new ByteArrayInputStream(bostream.toByteArray());
        ObjectInputStream input = new ContextObjectInputStream(bistream);
       
        try
        {
            return (MessageImpl) input.readObject();
        }
        catch (final IOException ioe)
        {
            throw ioe ;
        }
View Full Code Here

        // Read and test the preamble...
        if(inStream.read() != MessageSerializer.PREAMBLE_JAVA) {
            throw new IOException("Cannot deserialize message.  Unrecognized message preamble.");
        }

        ObjectInputStream input = new ContextObjectInputStream(inStream);
        try {
            return (Message) input.readObject();
        } catch (ClassNotFoundException e) {
            throw (IOException) (new IOException("Unable to deserialize message instance.").initCause(e));
        } finally {
            input.close();
        }
    }
View Full Code Here

        serial = null;
       
      try
      {
        reader = new FileInputStream(from);
        serial = (Serializable) new ContextObjectInputStream(reader).readObject();
        return Util.deserialize(serial);
      }
      catch (StreamCorruptedException ex)
      {
        // file present but not ready to read - wait
View Full Code Here

  public static Serializable decodeToObject (String param) throws IOException, ClassNotFoundException
  {
    if (param == null)
      throw new IllegalArgumentException();
   
    ContextObjectInputStream ois = null;
   
    try
    {
      ByteArrayInputStream bs = new ByteArrayInputStream(Base64.decodeBase64(param.getBytes()));
      ois = new ContextObjectInputStream(bs);

      return (Serializable) ois.readObject();
    }
    finally
    {
      ois.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.util.ContextObjectInputStream

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.