in impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java [306:331]
public Session deserialize( String str ) throws SecurityException
{
// deserialize the object
try
{
// This encoding induces a bijection between byte[] and String (unlike UTF-8)
byte b[] = str.getBytes("ISO-8859-1");
ByteArrayInputStream bi = new ByteArrayInputStream(b);
ObjectInputStream si = new ObjectInputStream(bi);
return Session.class.cast(si.readObject());
}
catch (java.io.UnsupportedEncodingException e)
{
throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_DESERIALIZATION_FAILED_UNSUPPORTED_ENCODING, "deserialize caught UnsupportedEncodingException:" + e, e );
}
catch (IOException e)
{
LOG.warn( "deserialize caught IOException:" + e);
throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_DESERIALIZATION_FAILED_IO, "deserialize caught IOException:" + e, e );
}
catch (ClassNotFoundException e)
{
LOG.warn( "deserialize caught ClassNotFoundException:" + e);
throw new SecurityException( org.apache.directory.fortress.realm.GlobalIds.CONTEXT_DESERIALIZATION_FAILED_CLASS_NOT_FOUND, "deserialize caught ClassNotFoundException:" + e, e );
}
}