Search in sources :

Example 1 with SecureClassLoaderObjectInputStream

use of com.swiftmq.tools.security.SecureClassLoaderObjectInputStream in project swiftmq-client by iitsoftware.

the class ObjectMessageImpl method deserialize.

private Serializable deserialize(byte[] b, ClassLoader loader) throws IOException, ClassNotFoundException {
    DataByteArrayInputStream bis = new DataByteArrayInputStream(b);
    ObjectInputStream ois = new SecureClassLoaderObjectInputStream(loader == null ? bis : bis, loader);
    Serializable obj = (Serializable) ois.readObject();
    ois.close();
    return obj;
}
Also used : SecureClassLoaderObjectInputStream(com.swiftmq.tools.security.SecureClassLoaderObjectInputStream) DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream) SecureClassLoaderObjectInputStream(com.swiftmq.tools.security.SecureClassLoaderObjectInputStream)

Aggregations

SecureClassLoaderObjectInputStream (com.swiftmq.tools.security.SecureClassLoaderObjectInputStream)1 DataByteArrayInputStream (com.swiftmq.tools.util.DataByteArrayInputStream)1