/** * Load the specified byte array. * * @param name the name of the object. * @return the loaded byte array. * * @see fr.dyade.aaa.util.Transaction#loadByteArray(java.lang.String) */ public final byte[] loadByteArray(String name) throws IOException { return loadByteArray(null, name); }
/** * Load the specified byte array. * * @param name the name of the object. * @return the loaded byte array. * * @see fr.dyade.aaa.util.Transaction#loadByteArray(java.lang.String) */ public final byte[] loadByteArray(String name) throws IOException { return loadByteArray(null, name); }
/** * Load the specified object. * * @param dirName the directory name of the object. * @param name the name of the object. * @return the loaded object. * * @see fr.dyade.aaa.util.Transaction#load(java.lang.String, java.lang.String) */ public final Object load(String dirName, String name) throws IOException, ClassNotFoundException { byte[] buf = loadByteArray(dirName, name); if (buf != null) { ByteArrayInputStream bis = new ByteArrayInputStream(buf); ObjectInputStream ois = new ObjectInputStream(bis); try { return ois.readObject(); } finally { ois.close(); bis.close(); } } return null; }
byte[] buf = loadByteArray(dirName, name); if (buf != null) { if (onlyUseJavaSerialization) {