try {
this.authorizations = new byte[authorizations.length][];
for (int i = 0; i < authorizations.length; i++) {
ba = authorizations[i];
ByteArrayOutputStream baos = new ByteArrayOutputStream(256);
JBossObjectOutputStream serialize = new JBossObjectOutputStream(baos);
serialize.writeObject(ba);
serialize.flush();
serialize.close();
this.authorizations[i] = baos.toByteArray();
}
} catch (IOException ioe) {
Logger log = LoggerFactory.getLogger(SavedAuthenticationImpl.class);
log.error("Could not serialize " + ba + ", may cause rights to be lost.", ioe);