Exemplo n.º 1
0
 @Override
 public void restore(Storage storage) throws StorageException {
   try {
     BufferedReader bufferedReaderInst =
         new BufferedReader(new InputStreamReader(storage.open(getNamespace(), getEntity())));
     String configInString = bufferedReaderInst.readLine();
     setConfiguration((V) getConfiguration().deserialize(configInString));
     bufferedReaderInst.close();
   } catch (IOException e) {
     throw new StorageException(e.getMessage());
   } catch (SerdeException e) {
     throw new StorageException(e.getMessage());
   }
 }